当前位置: 首页 > 图文教程 > 操作系统 > Windows > Windows忘记mysql密码的解决方案

Windows
Windows 7兼容中心即将上线
微软展示Windows 7:原生支持转码加速功能
Computex 2009大会 - Windows 7发售日期公布
Windows 7 RC发布导致Vista市场份额增速减缓
Windows 7 Build 7201 再次遭到泄露
Win 7家长控制功能规范员工电脑使用
巧妙使用Windows 7中空白鍵
微软 - Windows7将无法在搭载ARM处理器的上网本上运行
Windows Server 2008 R2新特性:活动目录回收站
微软确认:澳大利亚和新西兰是Windows 7首发地区
教你在Windows 7和XP之间共享文件
针对Windows 7 - 微软为旗下硬件开发新软件
微软商店确认Windows 7包装设计图
Windows Vista/7中关机、睡眠和休眠有什么区别?
XP用户观念根深蒂固 - 说服其升级到Windows 7困难重重
Windows 7 RTM Touch Pack - 触摸软件包泄露
Windows 7和多点触摸当道ComputeX 2009大会
一体成形电脑 - Omnia iPC S20 AiO
给Windows 7装上Vista的Windows Mail
Windows 7铃声试听下载

Windows忘记mysql密码的解决方案


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-16   浏览: 103 ::
收藏到网摘: n/a

如果忘记了 MySQL 的 root 密码,可以用以下方法重新设置:

1. KILL掉系统里的MySQL进程,方法如下:

a、点击桌面工具栏打开任务栏管理器。

b、从任务管理器的进程中找到mysqld-nt.exe进程,点击右键选择结束进程。


2. 在命令行中输入命令 mysqld-nt --skip-grant-tables 启动MySQL,以不检查权限的方式启动;

3. 然后另外开一窗口,用空密码方式使用root用户登录 MySQL;

4. 修改root用户的密码;

mysql> update mysql.user set password=PASSWORD('新密码') where User='root';
mysql> flush privileges;
mysql> quit

5. 重新启动MySQL,就可以使用新密码登录了。