【发布时间】:2018-04-13 10:46:14
【问题描述】:
我已经使用命令 brew install mysql 安装了 mysql。之后为root设置密码。我仍然无法登录 mysql shell
brew install mysql
sheetal$ mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
sheetal$ mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
sheetal$ sudo mysql -uroot -p
Password:
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
sheetal$ mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: YES)
【问题讨论】:
-
我认为您不需要考虑在此处使用
sudo...凭据问题出在 MySQL,而不是您的 Linux 安装。您确定您使用的是您实际设置的密码吗?如果你是,那我没有解释。也许由于某种原因没有设置。 -
@TimBiegeleisen:OP 使用的是 macOS not Linux。
-
它使用的是 MacOS@TimBiegeleisen
-
mysql_secure_installation 保护 MySQL 服务器部署。输入用户 root 的密码:错误:用户 'root'@'localhost' 的访问被拒绝(使用密码:YES)
-
@l'L'l 是的,我现在是这个,但 Mac OS 是 Linux 的一个分支(我认为)。无论如何,我的评论仍然适用于 MacOS。
标签: mysql ruby-on-rails macos