Mac下安裝mysql後無法啟動,錯誤提示The server quit without updating PID file
現象:
1 sudo /usr/local/mysql/support-files/mysql.server start 提示 The server quit without updating PID file
2 點選 系統偏好設定裡的 mysql 沒有看到正常的啟動頁面???
解決方法:
下載 mysql 的版本是不是和你機器的版本不一樣!?
比如你的系統是 mac os 10.10,你下了一個要求10.14 的mysql 。是啟動不了的。
Mac book pro下解除安裝mysql
再重灌吧。
參看:下文教怎麼看啟動失敗log。
With the help of a few answers posted here, I was able to find the issue
First I run
sudo -i
So I could have root access.
Than I deleted the xxxx.err file
rm -rf /usr/local/mysql/data/xxxx.err
after I started MySQL in SafeMode
/usr/local/mysql/bin/mysqld_safe start
It will try to start and will exit because of an error... a new xxx.err file will be created and you need to read it to see the cause of the error
tail -f /usr/local/mysql/data/mysqld.local.err
On my case, for some reason, it was missing some folder and file inside /var/log/
folder... So I created both
cd /var/log
mkdir mysql
touch mysql-bin.index
After the new file was created, than you need to change permission
chown -R _mysql /var/log/mysql
When all those steps where taken, my database started working immediately...
Hope this can help others here... The key is to read the error and log and find whats is wrong...