從系統(tǒng)偏好設(shè)置啟動(dòng)MySQL時(shí)涮坐,多次點(diǎn)擊start無效,發(fā)現(xiàn)下面顯示了一行警告“Warning the user/local/mysql/data directory is not owned by the mysql user”
百度沒找到能用的解決方案誓军,后來在stackoverflow上找到了能用的袱讹,原文鏈接如下:
http://stackoverflow.com/questions/5527676/warning-the-user-local-mysql-data-directory-is-not-owned-by-the-mysql-user/27517150#27517150
在終端輸入以下命令(需密碼),再點(diǎn)擊start即可
sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
sudo /usr/local/mysql/support-files/mysql.server start
PS:如果你忘了MySQL的密碼昵时,這個(gè)文章有修改密碼的步驟捷雕,比其他羅里吧嗦的好很多。地址在這里—>
http://www.cnblogs.com/lihuanqing/p/5623872.html
MAMP中的mysql密碼(默認(rèn)root - root)和自行安裝的mysql密碼不同壹甥。