Warning: mysql_connect(): Host '218.88.124.53' is not allowed to connect to this MySQL server in D:\newCodeBase\POCode\t.php on line 2警告:mysql_connect():主机'218.88.124.53'不被允许访问这个MYSQL服务器,在D:\newCodeBase\POCode\t.php第2行。
启动脚本去掉--skip-networks 否则MySQL只允许sock连接
在服务器端,进入mysql命令行模式,然后执行下面的命令就可以了。 grant privileges (columns) on what to user identified by "password" with grant option eg. grant all on saml_db.* to boris@% identified by "password";说明:允许用户boris使用saml数据库,%代表连接方式为任何一台主机,
否则MySQL只允许sock连接
grant privileges (columns)
on what
to user identified by "password"
with grant option
eg.
grant all on saml_db.* to boris@% identified by "password";说明:允许用户boris使用saml数据库,%代表连接方式为任何一台主机,
在远程mysql的mysql/host表里增加一条对应客户端的记录,然后flush priveleges或者重启mysql
| host | user | password |
+------+------+-------------------------------------------+
| % | root | *7AB489101EC50A9469089927E121F3BA669A315A |
+------+------+-------------------------------------------+
1 row in set (0.24 sec)
+------+-------+
| host | db |
+------+-------+
| % | mysql |
+------+-------+
1 row in set (0.01 sec)