1. 通过brew安装
brew install mysql
2. 启动mysql
brew services start mysql
结果报错
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/wuyf/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
报错提示是/bin/launchctl要加开机启动项, 而mac系统13+版本的权限策略有限制. 除非关闭SIP, 这个我没试.
我的是mysql 9.0.1版本, 网上有个和我情况一样的, 参考链接如下:
swwwwwwhttps://stackoverflow.com/questions/69094757/5-input-output-error-error-failure-while-executing-bin-launchctl-bootstrap
- brew services stop mysql
- brew install mysql@8.4
- brew services start mysql@8.4
- brew services stop mysql@8.4
- brew services start mysql
按这个几个命令执行后, 确实可以正常启动了.
3. mysql虽然可以使用了, Navicat工具却连不上, 报错如下:
2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 0x0002): tried: '../Frameworks/caching_sha2_password.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS../Frameworks/caching_sha2_password.so' (no such file), '/Applications/Navicat Premium.app/Contents/Frameworks/../Frameworks/caching_sha2_password.so' (no such file), '/Applications/Navicat Premium.app/Contents/Frameworks/../Frameworks/caching_sha2_password.so' (no such file), '/usr/lib/.
升级Navicat可以解决.
我换了个免费的工具 Beekeeper Studio.