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

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