Mysql忘记root密码
来自三线的随记
Windows系统
结束/关闭mysql服务端
跳过权限表认证
mysqld --skip-grant-tables
开启新的CMD
use mysql;
update user set password = password("xxx") where user = "root";
flush pivileges;
linux系统
/etc/my.cnf
mysqld块
skip-grant-tables
附
plugin字段
auth_socket
mysql_native_password