进出口安装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