美文网首页
mysql8忘记密码解决方案

mysql8忘记密码解决方案

作者: 我想静静777 | 来源:发表于2019-11-24 20:21 被阅读0次
    1. 关闭 mysql 服务
    2. 运行 mysqld --console --skip-grant-tables --shared-memory
    3. 打开一个新的命令窗口
    4. 运行 mysql -uroot
    5. 运行 update mysql.user set authentication_string='' where user='root' and host='localhost'
    6. 开启mysql服务

    密码已经被清空,如需设置新密码,执行 alter user user() identified by '此处输入要设置的新密码'

    note: 以管理员身份运行

    相关文章

      网友评论

          本文标题:mysql8忘记密码解决方案

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