navicat异常 - 1130-host ... is not allowed to connect to this MySql server

错误描述

用navicat连接数据库报错:1130-host ... is not allowed to connect to this MySql server如何处理

解决方案

1、连接服务器: mysql -u root -p

2、看当前所有数据库:show databases;

3、进入mysql数据库:use mysql;

4、查看mysql数据库中所有的表:show tables;

5、查看user表中的数据:select Host, User,Password from user;

6、修改user表中的Host:update user set Host='%' where User='root';

7、最后刷新一下:flush privileges;

猜你喜欢

转载自www.cnblogs.com/7q4w1e/p/9948679.html