Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report