学习笔记(11):MySQL数据库从入门到搞定实战-忘记root用户密码的解决方法
立即学习:https://edu.****.net/course/play/27328/370705?utm_source=blogtoedu
1、关闭权限验证:
mysql --defaults-file=''C:\ProgramData\MySQL\MySQL Server 8.0\my.ini'' --console --skip-grant-tables --shared-memory
2、刷新权限:
flush privileges;
3、修改root用户的密码:
alter user 'root'@'localhost' identified by '123456';