Get the App
SLTechnology News&Howtos  ›  Database  › 

The solution of MySQL Server Login failure ERROR 1820 (HY000)

Shulou Source: shulou.com Published: 2022-06-01 03:45:21 09月23日 Update

Failure site: log in to the MySQL server and report this error no matter what command you execute

Mysql > show databases;ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.mysql > use test;ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

How did this happen? Am I on a fake server?

Cause analysis: this is mainly controlled by a parameter default_password_lifetime, see the official explanation

Look carefully, Note information is sometimes more useful than the above information (I usually ignore the English note, it is possible that the part you ignore is also helpful to the performance)

Problem solving: in the open source world, we are not afraid to report mistakes. Only when we report mistakes can we solve the problem. Let's take a look at your own environment.

Mysql > select version (); +-+ | version () | +-+ | 5.7.10-3-log | +-+ 1 row in set (0.01sec) mysql > show variables like 'default_password_lifetime' +-- +-- + | Variable_name | Value | +-- +-+ | default_password_lifetime | 360 | + -+ 1 row in set (0.00 sec)

I see. Then change the password.

Alter user user () identified by "123456"

The problem has been solved successfully! The current user can successfully execute commands within permissions.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Tags: Server service success information command problem help failure login so it is world content reason cause analysis parameters official password that is ideas performance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS vpn Xiaomi Shulou Tech Info