Navicat连接云服务器mysql报错Host ‘****‘is not allowed to connect to this MysQL server
Navicat连接云服务器mysql报错Host ‘****‘is not allowed to connect to this MysQL server
·
1.云服务器端口未开放
解决:进入云服务器控制台,找到防火墙,添加3306端口即可
2.用户权限host问题
mysql -u root -p
登入mysql
切换数据库至mysql
show databases;
use mysql;
查询数据库root用户host配置
select host from user where user='root';

修改root用户host
如果root用户host配置的是localhost或者127.0.0.1,就将host修改为%;
最后刷新权限,就可以连接了
update user set host = '%' where user = 'root';
select host, user from user;
flush privileges;

测试连接成功!!!
更多推荐
所有评论(0)