Hey Stephen

努力,奋斗
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

windows下忘记root密码

Posted on 2014-07-20 18:49  Heystephen  阅读(276)  评论(0)    收藏  举报

1-->在DOS窗口下输入net stop mysql57

2-->切换到mysql的bin目录,运行mysqld --skip-grant-tables

3-->新开DOS,切换到bin目录,运行mysql -u root

4-->

use mysql 
update user set password=password("new_pass") where user="root"; 
flush privileges; 
exit;