Linux mysql ERROR 1045 解决

Posted 历史的尘埃

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux mysql ERROR 1045 解决相关的知识,希望对你有一定的参考价值。

Linux mysql 5.6: ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

[[email protected] init.d]# /etc/rc.d/init.d/mysqld stop

[[email protected] init.d]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

CTRL+C

[[email protected] init.d]# mysql -u root mysql

mysql> update user set password=PASSWORD(‘newpassword‘)
    -> where user=‘root‘ and host=‘root‘ or host=‘localhost‘;

mysql> flush privileges;

mysql> quit

[[email protected] init.d]# /etc/rc.d/init.d/mysqld restart

[[email protected] init.d]# mysql -u root -p
Enter password: (输入新密码即可,有可能要多刷几次)
















以上是关于Linux mysql ERROR 1045 解决的主要内容,如果未能解决你的问题,请参考以下文章

重置密码解决MySQL for Linux错误 ERROR 1045 (28000)

Linux mysql 5.7: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (usin

重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost'

重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost'

Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (usin

Linux_ERROR 1045 (28000): Access denied for user 'root'@'localhost'