mysql 忘记root密码

杀死mysql;

mysqld_safe --user=root --skip-grant-tables  

mysql

use mysql

 

update user set password=password('1234') where user='root';

flush privileges;

 

原文地址:https://www.cnblogs.com/lein317/p/5067616.html