Windows下mysql密码忘记怎么办?
1.    首先以系统管理员身份登陆系统
2.    打开命令行窗口停止mysql服务

C:\>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止
3.到 mysql的安装路径启动mysql,在bin目录下使用mysqld.exe启动,
在命令行窗口执行: mysqld --skip-grant-tables
4. 然后另外打开一个命入令行窗口,执行 mysql,此时无需输入密码即可进入。执行如下操作

C:\>mysql     无需输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.1-m2-community MySQL Community Server (GPL)
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql>
5.结束 mysqld进程
6.重新开启 mysql服务

C:\>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功
 
7.登陆 mysql成功

C:\>mysql -u root –pabc (这里只是证明密码修改成功,这样登陆不安全)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.1-m2-community MySQL Community Server (GPL)
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
密码修改成功