时间:2021-07-01 10:21:17 帮助过:93人阅读
代码如下:
mysql> grant all privileges on wubx.* to ‘wubx'@'172.16.100.185′ identified by ‘fd52!wubx&,';
Query OK, 0 rows affected (0.00 sec)
mysql>quit;
#mysql -h 172.16.100.185 -u wubx -pfd52!wubx&,
-bash: !wubx@,: event not found
在测一下程序方面是不是可以用,写一个PHP测一下。
代码如下:
$link = mysql_connect('172.16.100.185′,'wubx','fd52!wubx&,');
if (!link){
die(‘Could not connect:'.mysql_error());
}
echo ‘Connected successfully';mysql_close($link);
?>
#php testdb.php
Connected successfully