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 -urootTo 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
解决问题,但目前不知道是什么用处,这里先记录一下
时间: 2024-09-30 02:36:21