1.vi /etc/my.cnf
2.再my.cnf配置文件中加入skip-grant-tables
3.mysql -u root登陆mysql命令行
4.use mysql;
5.update user sete authantication_string = password(“要设置的密码”) where user = ‘root’;
6.exit;
【Linux】Linux环境下mysql忘记密码的解决办法
最新推荐文章于 2023-06-26 00:15:30 发布
1.vi /etc/my.cnf
2.再my.cnf配置文件中加入skip-grant-tables
3.mysql -u root登陆mysql命令行
4.use mysql;
5.update user sete authantication_string = password(“要设置的密码”) where user = ‘root’;
6.exit;