navicat远程连接阿里云ECS上的MYSQL报Lost connection to MySQL server at 'reading initial communication packet'

问题现象

MySQL 远程连接报错:Lost connection to MySQL server at 'reading initial communication packet'

解决方案

1、检查是否有防火墙限制
2、检查 MySQL 是否有访问权限

use mysql;
Grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;    
flush privileges;  

3、检查 my.ini 文件里是否设置了 bind-address 参数,如果有将该条注释掉即可。

4、在 my.ini 中添加 skip-name-resolve

vi /etc/my.cnf
[mysqld] 
skip-name-resolve  #增加这个

5、修改 hosts.allow

vi /etc/hosts.allow
mysqld-max : ALL :ALLOW   #增加这个
原文地址:https://www.cnblogs.com/yidiandhappy/p/7419405.html