使用远程工具连接提示**Host *** is not allowed to connect to this mysql server**拒绝连接错误

冷不防 2022-12-21 03:28 224阅读 0赞

这是由于Mysql配置了不支持远程连接引起的。

解决办法:

1、’在安装Mysql数据库的主机上登录root用户:

  1. mysql -u root -p密码

2、依次执行如下命令:

  1. use mysql;
  2. select host from user where user='root';

3、将Host设置为通配符%

  1. update user set host = '%' where user ='root';

4、刷新

  1. flush privileges;

5、使用navicat 成功连接至mysql

发表评论

表情:
评论列表 (有 0 条评论,224人围观)

还没有评论,来说两句吧...

相关阅读