啟動mysql報錯 -- ERROR! The server quit without updating PID file


開發說某個測試環境的mysql,無法重啟了,報以下錯誤提示:

# service mysqld restart
Shutting down MySQL.. SUCCESS! 
Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid).
# ps -ef|grep mysql|grep -v grep
avahi      697     1  0 Sep16 ?        00:00:02 avahi-daemon: running [test.local]
# service mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/test.pid).

 

看了一下錯誤日志,居然沒有任何提示。問他重啟之前做了什么操作沒有,回答說只是開啟了二進制,然后嘗試重啟就報錯了。

 

查看了一下my.cnf文件,的確是加了一個參數:

log_bin=binlog

  

但是發現沒有設置server-id,於是在配置文件中設置一個server-id:

server-id=1

  

重啟成功!

 

錯誤原因可以從官方文檔設置log-bin章節看到:

If you specify this option without also specifying a --server-id, the server is not allowed to start. (Bug #11763963, Bug #56739)

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM