可能的原因:
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;
可能的原因:
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;