本地无法连接linux服务器mysql(10060)

时间:2022-09-21 14:20:55

可能的原因:

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;