Navicat for MySQL远程连接数据错误代码10060
1.登陆远程linux服务器命令界面
vim /etc/sysconfig/iptables 进入防火墙配置修改
增加以下两条防火墙规则:
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
2.增加防火墙规则后(重启防火墙服务器):
service iptables restart
3.修改mysql远程访问权限命令:
mysql -h localhost -u root -p
root
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
flush privileges;
exit;
4.远程连接Mysql数据库成功
评论(0)