1. 停止mysql服务

2. 运行cmd窗口改变目录到mysql的安装路径bin

3. 运行命令:mysqld -nt --skip-grant-tables

4. 重新启动一个cmd窗口改变目录到mysql的安装路径bin

5. 运行命令:mysql -u root

6. 运行命令:update mysql.user set password=password('123456') where user='root';

7. 运行命令:flush privileges;

8. 在进程中关闭mysql和mysqld

9. 重启mysql服务

 

posted on 2014-12-26 15:48  Lisong  阅读(315)  评论(0)    收藏  举报