同时打开2个命令行窗口,并按如下操作:
f35d6e602fd7d0f0edfa6f7d103c1b57.在第一个“命令行窗口”输入:
cd D:/Program Files/MySQL/MySQL Server 5.5/binnet stop mysqlmysqld --skip-grant-tables
2cc198a1d5eb0d3eb508d858c9f5cbdb.在第二个“命令行窗口”输入:
cd D:/Program Files/MySQL/MySQL Server 5.5/binmysql -uroot -pmysql> update mysql.user set password=PASSWORD("新密码") where User="root";mysql> flush privileges;mysql> exitnet start mysql