出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' 不知道怎么解决
- 确保环境没有mysql
brew remove mysql
brew cleanup
- 安装
brew install mysql
- 启动
brew services start mysql
设置开机启动:launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
4.登录
mysql -uroot