binbinyouni

Navicat无法连接到Mysql,返回的错误码是Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

参考了文章MySQL远程连接丢失问题解决方法(Lost connection to MySQL server)

停止Mysql服务

[root@localhost mysql]# service mysql stop
停止 mysqld:                                              [确定]

更改Mysql配置文件,如果有bind-address 这一行,注释掉。

加上一个新的参数skip-name-resolve

保存退出。重启服务即可。

附:

skip-name-resolve的含义

skip-name-resolve的最用是禁止了DNS解析,通过IP来连接数据库,当然这个IP必须要在Mysql的授权表中

分类:

技术点:

相关文章:

  • 2021-12-25
  • 2021-10-13
  • 2021-12-01
  • 2021-05-27
  • 2021-06-25
  • 2022-01-02
  • 2021-04-30
猜你喜欢
  • 2021-12-23
  • 2021-10-26
  • 2022-12-23
  • 2021-10-28
  • 2021-08-01
  • 2021-11-14
  • 2022-03-03
相关资源
相似解决方案