由于很長時間沒有使用MySql将塑,今天想啟動一下發(fā)現(xiàn)啟動不了恋脚,輸入MySql啟動命令報錯今妄。
操作步驟如下:
輸入MySql啟動命令:
sudo /usr/local/mysql/support-files/mysql.server start
報錯信息如下:
Starting MySQL
.Logging to '/usr/local/mysql/data/mac.local.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/mac.local.pid).
后面找到原因發(fā)現(xiàn)目錄/usr/local/mysql/data/
的mysql擁有者權(quán)限發(fā)生了變更届囚,沒有寫的權(quán)限算谈,所以需要對該目錄賦予寫的權(quán)限嘉冒,操作命令如下:
sudo chown -R mysql /usr/local/mysql/data
然后再次輸入啟動命令:
sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
.Logging to '/usr/local/mysql/data/oxy-mac.local.err'.
. SUCCESS!
成功了曹货!