進出口安裝MySQL在我的MacOS與我所面臨的問題,同時更改密碼的following tutorial和完成一切:啤酒不能改變mysql的密碼
Open Terminal and execute the following command to set the root password:
mysqladmin -u root password 'yourpassword'
所以我打字它,我看到了錯誤:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
所以我想也許我的mysql服務沒有運行:
$ brew services list
但它是:
Admin-MacBook-Pro:log sandra$ brew services list
Name Status User Plist
mysql started sandra /Users/sandra/Library/LaunchAgents/homebrew.mxcl.mysql.plist
因此也許mysql.sock文件丟失?不,它的名字是/tmp/mysql.sock.lock
。那麼問題在哪裏呢?我試着用Google搜索這個問題。
brew服務重新啓動mysql – Asaph
嘗試了很多次 – Sandra
查看mysql的日誌文件來查看啓動錯誤是什麼。 – Asaph