mac brew 安装 mysql8 无法启动

查看 74|回复 2
作者:intkilow   
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook-Pro-3.local.pid).
[email protected] ~ % brew services info mysql
mysql (homebrew.mxcl.mysql)
Running: ✔
Loaded: ✔
Schedulable: ✘
User: root
PID: 598
[email protected] ~ % mysql
mysql: [Warning] World-writable config file '/etc/my.cnf' is ignored.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Users/xxxxx/Documents/mysql.sock' (2)
[email protected] ~ % mysql -u root
mysql: [Warning] World-writable config file '/etc/my.cnf' is ignored.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Users/chengpeng/Documents/mysql.sock' (2)
[email protected] ~ %
macos 13
试了办法
brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /usr/local/var/mysql
brew install mysql
mysqld --initialize --explicit_defaults_for_timestamp
mysql.server start # no sudo!

MySQL, brew, local, XXXXX

wu67   
mac 配数据库建议 docker. 没这么多奇奇怪怪的问题.
intkilow
OP
  
[email protected] ~ % sudo mysql_secure_installation
mysql_secure_installation: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Securing the MySQL server deployment.
Enter password for user root:
Error: Can't connect to local MySQL server through socket '/Users/xxxxx/Documents/mysql.sock' (2)
[email protected] ~ %
您需要登录后才可以回帖 登录 | 立即注册

返回顶部