MySQL重置密码
新开cmd
net stop mysql
进入MySQL的bin目录
mysqld –shared-memory –skip-grant-tables
保持窗口
新开cmd
use mysql
刷新权限
FLUSH PRIVILEGES;
更改密码
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘Zj238236’;
错误日志
mysqld --console
关闭mysqld服务
tasklist| findstr “mysql”
taskkill -PID
taskkill/f /t /im mysqld.exe
重启mysql服务
net start mysql
MySQL重新初始化
net stop mysql
mysqld remove
删除data文件夹
mysqld --initialize
mysqld --initialize-insecure(生成空密码)
mysqld install
net start mysql
mysql -u root -p 9_r?Yh1ka/lu(位于新生成的data文件夹下"本机主机名.err"文件)
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘********’;(修改密码)