Navicat远程连接云服务器报错:1130-host ... is not allowed to connect to this MySql server

Navicat远程连接云服务器报错:1130-host … is not allowed to connect to this MySql server

报错:1130-host ... is not allowed to connect to this MySql server

可能存在的问题

可能是你的帐号不允许从远程登陆,只能在localhost。
这个时候只要在localhost的那台电脑,登入mysql后,更改 “mysql” 数据库里的 “user” 表里的 “host” 项,从"localhost"改称"%"

解决方法

1. 在云服务(这里以Windows 2012 R2 为例)里以管理员的形式打开命令提示符
2. 输入mysql -u root -p;     `敲回车这里输入密码`
3. use mysql;
4. update user set host = '%' where user = 'root';
5. select host, user from user;
6. flush privileges; `修改生效`

猜你喜欢

转载自blog.csdn.net/qq_46036214/article/details/115490972