Fault site: Log in to the MySQL server and get 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 could 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, the Note information is sometimes more useful than the above information (I usually ignore the English notes, but it is possible that the part you ignore may also help performance) Problem solving: In the open source world, we are not afraid of errors, because only when errors are reported can we have solutions. Let's take a look at your environment. mysql> select version(); +--------------+ | version() | +--------------+ | 5.7.10-3-log | +--------------+ 1 row in set (0.01 sec) 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 was successfully solved! The current user can successfully execute commands within the scope of his permissions. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of permission management commands in Linux (chmod/chown/chgrp/unmask)
>>: Detailed steps for building a React application with a Rails API
Recent requirements: Global loading, all interfac...
Copy code The code is as follows: <iframe src=...
1. Install MySQL database ① Download and unzip an...
Export database data: First open cmd and enter th...
Add an input file HTML control to the web page: &...
Storage rules for varchar In versions below 4.0, ...
I believe everyone has used JD. There is a very c...
Recently, when I was learning docker, I found tha...
The three-dimensional column chart consists of th...
This article mainly summarizes some commonly used...
This article example shares the specific code of ...
Startups often bring us surprises with their unco...
1. Log in to MySQL and use SHOW VARIABLES LIKE ...
1. Commonly used high-order functions of arrays S...
Table of contents About FastDFS 1. Search for ima...