本地mysql忘记密码的解决办法

首先停止mysql

C:\Program Files\MySQL\bin>net stop mysql
MySQL
服务正在停止.
MySQL
服务已成功停止。


然后使用mysql bin目录的mysqld-nt.exe 执行命令 mysqld-net �Cskip-grant-tables
C:\Program
Files\MySQL\bin>mysqld-nt.exe �Cskip-grant-tables


新开cmd,再次跳转到bin目录,输入mysql,即登录成功,后续就是自己修改密码之类的;


C:\Program Files\MySQL\bin>mysql
Welcome
to the MySQL monitor. Commands end with ; or \g.
Your
MySQL connection id is 1
Server
version: 5.0.91-community-nt MySQL Community Edition (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>


你可能感兴趣的:(mysql,密码, )