1. 进入mysql安装目录bin目录下
执行 net stop mysql 停止服务
2.执行 mysqld --skip-grant-tables
3新打开cmd
输入 mysql -uroot -p
提示输入密码时直接按 enter
4. 修改密码:
update MySQL.user set authentication_string=password('root') where user='root' ;
提示ok 成功
1. 进入mysql安装目录bin目录下
执行 net stop mysql 停止服务
2.执行 mysqld --skip-grant-tables
3新打开cmd
输入 mysql -uroot -p
提示输入密码时直接按 enter
4. 修改密码:
update MySQL.user set authentication_string=password('root') where user='root' ;
提示ok 成功