mysql的root密码忘了

忘记密码:
https://www.cnblogs.com/ryanzheng/p/9348723.html
my.cnf
的[mysqld]下加:
skip-grant-tables
重启

mysql -uroot
update user set authentication_string = NULL where user = 'root';
退出,删除skip-grant-tables,重启
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'web99~';

posted on 2019-11-04 15:31  锋锋2019  阅读(104)  评论(0编辑  收藏  举报

导航