Navicat 链接阿里云服务器中的Mysql 提示Host‘xxxx is not allowed to connect to this MySQL server‘

Navicat远程连接阿里云服务器问题:1130 Host'xxxx is not allowed to connect to this MySQL server'

问题描述:

使用Navicat链接阿里云服务器的Mysql时候,错误:1130 Host'xxxx is not allowed to connect to this MySQL server

我也是试了很多方法最后,成功根据Navicat远程连接阿里云服务器问题:1130 Host‘xxxx is not allowed to connect to this MySQL server‘_Lcreator的博客-CSDN博客

解决:

1. 先检查阿里云服务器的安全组和防火墙是否开放3306端口(防火墙可以使用bt面板进行配置)

2. 链接阿里云服务器mysql -uroot -p 输入密码进行登录

3. 登录后use mysql 

4. update user set host='%' where user='root' and host='localhost'; #开放mysql远程连接给所有ip

5. flush privileges;  #刷新权限表

注:想关闭远成链接

执行第345步,第3步改为update user set host='localhost' where user='root';


版权声明:本文为xnbV587原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。