日期:2014-05-16  浏览次数:20714 次

mysql错误1130

在用远程连接mysql数据库时,总是报错误码: 1130: Host 192.168.1.168 is not allowed to connect to this MySQL server

远程主机无权限访问mysql数据库,解决问题如下:


登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"

mysql -u root -p password
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;