首页 > 数据库技术 > 详细

MYSQL: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

时间:2017-05-08 15:36:54      阅读:302      评论:0      收藏:0      [点我收藏+]

1) /etc/init.d/mysqld stop

2) mysqld_safe --skip-grant-tables &

3) mysql -u root

4) Setup new MySQL root user password
use mysql;
#update user set password=PASSWORD("123456") where User=‘root‘;
#update mysql.user set password=PASSWORD("123456") where user=‘root‘;
update mysql.user set authentication_string=password(‘123qwe‘) where user=‘root‘ and Host =‘localhost‘;

flush privileges;
quit

5) Stop MySQL Server: /etc/init.d/mysqld stop

6) Start MySQL server and test it:

/etc/init.d/mysqld start

mysql -u root -p

MYSQL: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

原文:http://www.cnblogs.com/dearxixi/p/6824959.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!