Mac启动mysql出现错误

Mac启动mysql出现错误error: ‘Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)‘

刚刚升级mac到10.10,重新用Homebrew安装了出现提示:

A “/etc/my.cnf” from another install may interfere with a Homebrew-built
server starting up correctly.

To connect:
mysql -uroot

To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don‘t want/need launchctl, you can just run:
mysql.server start

参考stackoverflow ,使用mysqld stop停止,然后用mysql.server restart解决了问题

按照Homebrew的安装提示,可能可以使用launchctl解决问题,但目前不知道是什么用处,这里先记录一下

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。