错误截图

mysql_1130CodeError

错误原因

错误:ERROR 1130: Host ‘192.168.XX.XXX’ is not allowed to connect to thisMySQL serve

错误 1130:主机 192.168.XX.XXX”不允许连接到 thismysql 服务

原因:被连接的数据不允许使用 192.168.XX.XXX 访问,只允许是用 localhost;

解决办法

在 localhost 的那台电脑,登入 mysql 后,更改”mysql” 数据库里的 “user” 表里的 “host”项,从”localhost”改称”%”

命令详情

COPY
mysql -u root -p

use mysql;

select 'host' from user where user='root';

update user set host = '%' where user ='root';

flush privileges;

select 'host' from user where user='root';