記錄一次mysql錯誤[ERROR] Can’t start server: can’t create PID filepath: No such file or directory
阿里云服務器,強制重啟后mysql啟動不了,網上找了各種帖子,最終https://blog.csdn.net/qq_31977125/article/details/84318745帖子中的內容靠譜些,但是按步驟執行還是報錯,最后看評論是文件路徑有些問題
整理下解決方案:
1.在/etc/my.cnf 中查看pid-file的位置
pid-file=/var/run/mysqld/mysqld.pid
2.創建對應的目錄并修改權限
mkdir -p /var/run/mysqld
chown mysql.mysql /var/run/mysqld
3.重啟mysql
service mysqld restart
廢了兩個小時,最終解決了
浙公網安備 33010602011771號