navicat创建连接 2002-can‘t connect to server on ....

环境:

系统:centos7

生产环境:docker 中部署MySQL

报错提示符:“2002-Can't connect to server on '192.168.200.22'(10060)”

 

 

 

 

 

出现报错的应用:

1、网络不通;

2、服务未启动;

启动 docker 容器中的MySQL服务
docker start mysql

3、防火墙未关闭;

systemctl stop firewall
systemctl disable firewall

 

4、服务器上防火墙端口未开放;

提交一条允许3306端口的规则
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

5、端口未被监听;

6、权限不足。

mysql> grant all privileges on *.* to 'root'@'%' identified by '123456';

 

解决: 发现MySQL 被关掉了,启动重新连接就好了!!!

 

 

posted @ 2022-04-06 20:17  xiao智  阅读(8532)  评论(0编辑  收藏  举报