共計 815 個字符,預計需要花費 3 分鐘才能閱讀完成。
本篇內容介紹了“怎么解決 MySQL server PID file could not be found 問題”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓丸趣 TV 小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
root@s1 Downloads]# service mysql restart
MySQL server PID file could not be found! [FAILED]
[root@s1 Downloads]# service mysql stop
MySQL server PID file could not be found! [FAILED]
解決方法:
1. 通過 ss -tnl 命令查看服務
[root@s1 Downloads]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 *:3306 *:*
2,停止 mysql 服務
[root@s1 Downloads]# killall mysqld
3. 重啟 mysql 服務
4. 發現 mysql 數據目錄權限異常
[root@s1 Downloads]# mysql
ERROR 2002 (HY000): Can t connect to local MySQL server through socket /var/lib/mysql/mysql.sock (2)
5. 修改 mysql 數據目錄權限
[root@s1 Downloads]# chown -R mysql.mysql /var/lib/mysql/
6. 重啟服務,即可以正常登陸 mysql
“怎么解決 MySQL server PID file could not be found 問題”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注丸趣 TV 網站,丸趣 TV 小編將為大家輸出更多高質量的實用文章!