我在启动和运行mysql OSX时遇到严重问题。 我安装了自制软件,php和mysql。
当我运行Brew服务列表时,会看到以下内容:
Name Status User Plist
dnsmasq started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
mysql@5.7 started sidney /Users/sidney/Library/LaunchAgents/homebrew.mxcl.mysql@5.7.plist
nginx started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php started root /Library/LaunchDaemons/homebrew.mxcl.php.plist
但是一旦我尝试:
mysql -uroot
mysql -u root -p
他们都给我以下错误:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
我也尝试过:
mysql_secure_installation
但是我看到以下输入密码的过程:
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost'
如何在Mac上修复mysql?