navicat连接数据库:

1.grant all privileges on *.* to‘guest’@’%’ identified by ‘***’ with grant option;
flush privileges;
2.配置防火墙
centos7 防火墙cat /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
systemctl restart iptables
3.检查端口netstat -tpnlu,确保3306端口监听所有地址(0.0.0.0
4.阿里云后台安全组是否开放 3306端口

猜你喜欢

转载自blog.csdn.net/rock5275/article/details/80183868