Navicat连接Linux系统的mysql服务,报错1130host ... is not allowed to connect to this MySql server

参考链接:

https://www.cnblogs.com/youqc/p/10476605.html

https://www.cnblogs.com/chunguang-yao/p/10666403.html

这个问题是因为在数据库服务器中的mysql数据库中的user的表中没有权限(也可以说没有用户),;遇到这个问题首先到mysql所在的服务器上用连接进行处理(mysql未开启mysql远程访问权限)

      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 host='localhost' and User='root';

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

发布了100 篇原创文章 · 获赞 47 · 访问量 21万+

猜你喜欢

转载自blog.csdn.net/sl1990129/article/details/103374524
今日推荐