Mysql Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

在用Navicat for MySQL远程连接mysql的时候,出现了

Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

 

修改my.cnf文件(windows为my.ini)

一般在mysql的安装目录,/etc/mycnf。

在my.cnf配置文件中的[mysqld]区域添加skip-name-resolve,看网友说的是跳过mysql连接的DNS反向解析功能,这样能很好地提高mysql性能。在这种情况下,就只能使用MySQL授权表中的IP来连接mysql服务了。

参考:https://www.cnblogs.com/leeke98/p/9018045.html

posted @ 2019-06-03 13:54  念宇儿  阅读(7897)  评论(0编辑  收藏  举报