【问题标题】:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) on Ubuntu (Zorin OS)错误 1045 (28000): 在 Ubuntu (Zorin OS) 上用户 'root'@'localhost' 的访问被拒绝(使用密码:YES)
【发布时间】:2022-01-26 19:33:50
【问题描述】:

我已经尝试了很多来摆脱这种情况。但是我该如何解决呢?

sudo 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 -u root -p

同样的结果。无法重设密码。

在尝试进入mysql时出现这个错误:

sudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

我该如何解决这个问题?

【问题讨论】:

    标签: mysql linux ubuntu


    【解决方案1】:

    试试 grep '为 root@localhost 生成一个临时密码' /var/log/mysqld.log |tail -1 并测试密码

    【讨论】:

    • 请您给出正确的步骤吗?
    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2017-11-07
    • 2016-09-29
    • 2013-04-25
    • 2022-06-22
    • 2013-11-28
    • 2014-03-23
    • 2017-08-23
    • 2018-05-26
    相关资源
    最近更新 更多