ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决办法

1.修改MySQL配置文件

my.cnf

在[mysqld]加入 skip-grant-tables




2.重启MySQL服务

3再次执行

mysql -u root -p

不需要输入密码

4.修改密码

update user set Password=PASSWORD('888888') where User='root';

下次登录就使用888888来登录



猜你喜欢

转载自blog.csdn.net/resilient/article/details/80959057