• 首页
  • 云服务器
  • 高防服务器
  • 外贸服务器
  • 服务器租用
  • 客服中心
易网主机
电脑版
首页 > 文章中心 > 应用管理

windows下mysql忘记root密码的解决方法

2014-07-13

1、在DOS窗口下输入net stop mysql5 或 net stop mysql

2、开一个DOS窗口,这个需要切换到mysql的bin目录。
一般在bin目录里面创建一个批处理1.bat,内容是cmd.exe运行一下即可就切换到当前目录,然后输入
mysqld-nt --skip-grant-tables;

3、再开一个DOS窗口,mysql -u root

4、输入:
 
代码如下:

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

技术专线:028-62454538(周一至周五)
夜间值班:18982208090(24H) 13438034514(24H)
公司地址:成都市金牛区蜀汉路238号元亨商贸楼605室
电子邮件:service#34514.cn(#替@)
蜀ICP备09003074号-1 川公网安备 51010602000340号
  • QQ咨询

  • 在线咨询

  • Skype咨询

  • 联系我们