Loading... <div class="tip share">请注意,本文编写于 815 天前,最后修改于 89 天前,其中某些信息可能已经过时。</div> 1.可以让你的 MySQL 无密码登录 `mysqld --console --skip-grant-tables --shared-memory` 2.启动另外一个 cmd,启动 MySQL `mysql -u root -p`密码直接按回车即可 3.清空掉密码 `use mysql;` `update user set authentication_string='' where user='root';`(将密码置为空) 4.关闭 cmd,重新来,此时是真正的空密码登录 然后执行`ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';`即可。 原文地址:https://blog.csdn.net/qq_43342301/article/details/91288891 Last modification:May 19, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 如果觉得我的文章对你有用,请随意赞赏