美文网首页
MYSQL 忘记密码笔记

MYSQL 忘记密码笔记

作者: 蟠龙有悔 | 来源:发表于2019-03-01 17:29 被阅读0次
vim /etc/my.cnf
# 在 [mysqld] 模块下加入一行代码
skip-grant-tables
#直接输入mysql 登录
$ mysql

mysql > use mysql;
mysql > update user set authentication_string = password('123123') where user = 'root';
mysql > flush privileges;
mysql > quit;

# 进入 /etc/my.cnf 删掉skip-grant-tables
$ systemctl restart mysqld

摘录自:
https://www.cnblogs.com/yanziwen/p/9215264.html

相关文章

网友评论

      本文标题:MYSQL 忘记密码笔记

      本文链接:https://www.haomeiwen.com/subject/yrcjuqtx.html