not allowed to connect to this MySQL server

 时间:2026-02-12 00:59:21

1、在用绵贪鬼Navicat配置远程连接Mysql数据库时遇到如下报错信息,这是由于Mysql配置了不支持远程连接引起的。

not allowed to connect to this MySQL server

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

mysql -u root -p

not allowed to connect to this MySQL server

3、依次执行如下命令:

use mysq;

select host from user where user='root';

可以看到当前主机配置信息为localhost.

not allowed to connect to this MySQL server

4、执行update user set host = '%' where user ='root'将爹哨Host设置为通配符%。

Host设置了“%”后便可以允许远程访问。

not allowed to connect to this MySQL server

not allowed to connect to this MySQL server

5、Host修改完成后记得执行flush privilegs使配置立即生效。

not allowed to connect to this MySQL server

6、完成以上操作后,再试尝试远程连接Mysql,报错信息扯信消失。如果再次连接出现2059报错信息,可以参考以下经验解决。

not allowed to connect to this MySQL server

  • IIS无法验证对路径…………的访问【解决方法】
  • kali终止的任务如何恢复
  • idea如何导入本地的maven项目
  • SQL Server还原数据库失败怎么办
  • DB2客户端工具使用教程
  • 热门搜索
    遵纪守法手抄报图片 俭以养德手抄报 以爱国为主题的手抄报 防震减灾的手抄报 祖国我为你骄傲手抄报 传统文化手抄报大全 手抄报版式 森林防火手抄报图片 心理健康手抄报素材 圣诞节手抄报英语