MySQL数据库使用报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before execu

Posted 呆呆的clearlie

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL数据库使用报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before execu相关的知识,希望对你有一定的参考价值。

今天mysql数据库,在使用的过程中一直报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

之所以出现这个问题是因为用户可以登录到MYSQL服务器,但是在用户为设置新密码之前,不能运行任何命令,就会得到上图的报错,修改密码即可正常运行账户权限内的所有命令。

解决方式如下:

以管理员身份打开命令提示符,进入到MySQL数据库中,不知道怎么进入MySQL数据库可以参考:https://www.cnblogs.com/clearlie/p/13228681.html

然后输入下面的指令:

mysql> ALTER USER USER() IDENTIFIED BY \'123456\';

 

 

以上是关于MySQL数据库使用报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before execu的主要内容,如果未能解决你的问题,请参考以下文章

mysql5.7初始化密码报错 ERROR 1820 (HY000)

mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement

MySQL ERROR 1820 (HY000)

MySQL5.7 报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before execu

mysql 报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin(

mysql 5.7密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before exe