跳过受权方式,直接登陆!!python
1.以管理员身份打开cmdmysql
2.停掉mysql服务端sql
C:\WINDOWS\system32>net stop mysql MySQL 服务正在中止. MySQL 服务已成功中止。
3.执行以下命令跳过受权表ide
#跳过受权表 C:\WINDOWS\system32>mysqld --skip-grant-tables 2018-06-09 17:12:38 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2018-06-09 17:12:38 0 [Note] mysqld (mysqld 5.6.40) starting as process 6052 ...4.
4.再次查看spa
5. 如今能够任意的更改密码,执行以下命令rest
6.刷新权限,执行命令code
flush privileges;
7.退出mysql。执行命令:exit,blog
8.让用户去加载权限,以管理员身份进入cmd,查看当前mysql进程进程
1
|
tasklist |findstr mysql
#查看当前mysql的进程
|
9.杀死当前的进程,执行以下命令ip
taskkill /F /PID 6052 # 杀死当前的进程pid
10.再次执行以下操做,还原