1.停止mysql
2.命令行启动mysql
mysqld --defaults-file="c:\mysql\mysql server 5.1\my.ini" --console --skip-grant-tables
3.无密码登录后执行以下sql
update mysql.user set password = password('123456') where user = 'root';
flush privileges;
一切恢复正常!
2023-08-07 20:14:04
1.停止mysql
2.命令行启动mysql
mysqld --defaults-file="c:\mysql\mysql server 5.1\my.ini" --console --skip-grant-tables
3.无密码登录后执行以下sql
update mysql.user set password = password('123456') where user = 'root';
flush privileges;
一切恢复正常!