CentOS7防火墙未关闭,导致navicat连接mysql服务端报10060错误

今天在测试环境中,搭建了一个Mysql数据库,用于测试用。服务器是阿里云的,操作系统是CentOS7,当把数据库安装好了后,用Navicat死活连不上mysql。

排除问题的步骤:

1. 查看阿里云服务器的端口号3306是否打开了;

2. 关闭防火墙;

我就是因为防火墙没关闭,导致用Navicat死活连不上mysql数据库。

在CentOS7上,关闭防火墙的命令是:systemctl stop firewalld.service

启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?
查看已启动的服务列表:systemctl list-unit-files|grep enabled

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章