使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)
导致些问题可能有以下几个原因:
1、网络不通; //ping 测试
2、服务未启动; //CentOS服务器 # /etc/init.d/mysqld start
3、MySQL配置不容许远程访问,重启命令:/etc/init.d/mysqld restart
user mysql;
select user,host from user;
grant all privileges on *.* to 'root'@'%' identified by '你的密码' with grant option;
FLUSH PRIVILEGES;
select user,host from user;
grant all privileges on *.* to 'root'@'%' identified by '你的密码' with grant option;
FLUSH PRIVILEGES;
4、防火墙端口未开放; //# netstat
-tunlp |grep 3306
-tunlp |grep 3306
systemctl
stop firewalld.service #停止firewall
stop firewalld.service #停止firewall
5、阿里云组策略问题;
经过测试发现,确实防火墙的原因。阿西吧。