场景

  • 闲置一段时间的服务 ubuntu 16.04 忘记了密码

解决

修改mysql 配置文件

文件 /etc/mysql/mysql.conf.d/mysqld.conf
位置 标记行下面添加skip-grant-tables
mysql 忘记密码

重启mysql

sudo service mysql restart
mysql (不需要输入密码) 进入
执行更新命令

update mysql.user set authentication_string=password(‘新密码’) where user=’root’ ;

相关文章:

  • 2021-07-11
猜你喜欢
  • 2021-12-25
  • 2021-09-12
  • 2021-12-27
  • 2021-12-27
  • 2021-06-10
  • 2021-09-21
相关资源
相似解决方案