Navicat

远程连接Mysql时can't connect to MySQL server on 'xx.xx.xx.xx'(10060)解决方式

文 / 管理员 来源 / 转载:https://blog.csdn.net/qq_43910202/article/details/108292719 阅读 / 207 2年前

1、由于服务器没有对外开放mysql的默认端口3306导致

CnetOs7开启方式

firewall-cmd --permanent --zone=public --add-port=3306/tcp
firewall-cmd --reload

 centos出现“FirewallD is not running”怎么办   (传送门)


2.未设置远程用户访问权限导致

在服务器上连接mysql

(1)先在服务器中通过命令行方式登录mysql:mysql -u root -p 密码 
(2)执行use mysql; 
(3)grant all privileges on *.* to 'root'@'%' identified by 'root用户的密码';
(4)flush privileges;

查看select host,user from user;

远程连接Mysql时can't connect to MySQL server on 'xxxx.xxxx.xxx.xx'(10060)解决方式

3、设置安全组

远程连接Mysql时can't connect to MySQL server on 'xxxx.xxxx.xxx.xx'(10060)解决方式

远程连接Mysql时can't connect to MySQL server on 'xxxx.xxxx.xxx.xx'(10060)解决方式

远程连接Mysql时can't connect to MySQL server on 'xxxx.xxxx.xxx.xx'(10060)解决方式

这样就OK了

评论

共0条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

站点声明:本站转载作品版权归原作者及来源网站所有,原创内容作品版权归作者所有,任何内容转载、商业用途等均须联系原作者并注明来源。

© 2020-2030 qdxcy.cn 版权所有京ICP备13045222号
相关侵权、举报、投诉及建议等,请发E-mail:2323946929@qq.com

友情链接: YzmCMS官方网站 YzmCMS官方论坛