mysql重置root密码

一不小心密码忘记了。。

首先按照这篇文章https://blog.csdn.net/coder_jeremy/article/details/73928028

一直到这一步:

使用命令更改root密码:UPDATE user SET Password=PASSWORD('新密码') where USER='root';

MySQL升级后将字段名给改了,password名称改为authentication_string了,所以要改成

UPDATE user SET authentication_string=PASSWORD('新密码') where USER='root'

猜你喜欢

转载自www.cnblogs.com/zhengbiyu/p/8856545.html