命令提示符 net stop mysql 停止mysql服务
C:Documents and Settingstony>net stop mysql
MySQL 服务正在停止
MySQL 服务已成功停止
进入bin目录
C:Documents and Settingstony>cd C:Program FilesMySQLMySQL Server bin
C:Program FilesMySQLMySQL Server bin>mysqld nt console skipgranttables
另外开一个新的cmd
C:Program FilesMySQLMySQL Server bin>mysql
mysql> use mysql;
mysql> update user set password=password("") where user="root";
mysql> flush privileges;
完事重启服务