之前一直用免密码登录 😢😢 😢,今天再次找方法去修改密码,但网上方法一直失效,直到找到这篇,
blog
mysql> update mysql.user set authentication_string=password("123456"),plugin='mysql_native_password' where user='root';
其实就比网上多一步操作,update mysql.user中 修改plugin='mysql_native_password'就完事了,否则将仍然登录失败.
这篇博客分享了解决MySQL免密码登录失效后,如何正确修改root用户密码的方法。关键步骤是在`mysql.user`表中设置`authentication_string`为新密码,并更新`plugin`为`mysql_native_password`,确保登录成功。
1040

被折叠的 条评论
为什么被折叠?



