时间:2021-07-01 10:21:17 帮助过:12人阅读
<1>.在第一个“命令行窗口”输入:
cd D:/Program Files/MySQL/MySQL Server 5.5/bin
net stop mysql
mysqld --skip-grant-tables
<2>.在第二个“命令行窗口”输入:
cd D:/Program Files/MySQL/MySQL Server 5.5/bin
mysql -uroot -p
mysql> update mysql.user set password=PASSWORD("新密码") where User="root";
mysql> flush privileges;
mysql> exit
net start mysql