Linux里面的MySQL忘记密码RROR 1045 (28000): Access denied for user 'root'@'localhost' (u

1.在my.conf
我的conf在etc下

skip-grant-tables

编写完:wq保存退出

Linux里面的MySQL忘记密码RROR 1045 (28000): Access denied for user 'root'@'localhost' (u

2.进入mysql

mysql -u root -p

Linux里面的MySQL忘记密码RROR 1045 (28000): Access denied for user 'root'@'localhost' (u

执行以下命令

update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';

Linux里面的MySQL忘记密码RROR 1045 (28000): Access denied for user 'root'@'localhost' (u

3.到这里还没结束,需要把你my.conf 里面的skip-grant-tables删除再登录

上一篇:error: open /var/root/.ssh/id_rsa: permission denied


下一篇:严重: A request has been denied as a potential CSRF attack.