报错:1130-host ... is not allowed to connect to this MySql server,MySQL不允许从远程访问

1.可以登陆访问  http://localhost:8001,对应的root账号.  将localhost改为通配符%

use mysql;

show tables;

select * from user;

update user set Host='%' where Host='localhost' and User='root';

select * from user;

2.对主机授权,同样需要root用户权限

GRANT   ALL   PRIVILEGES   ON   *.*   TO   'root'@'%'   WITH   GRANT   OPTION;

FLUSH   PRIVILEGES;


Logo

更多推荐