可能的原因:
1、linux防火墙未加3306端口
2、关闭firewalld防火墙:systemctl stop firewalld,systemctl disable firewalld
3、服务器上登录mysql,查看是否有地址限制,
use mysql;
select host,user from user;
grant all privileges on *.* to ‘root’@’%’ identified by ‘密码’;
flush privileges;
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/database/4710.html