Tag Archives: MYSQL ERROR 1820

linux mysql ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

1. Error information

ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

2. Cause of error

This error means that the original password needs to be changed to execute a MySQL statement

3. Solutions

Log in to MySQL

mysql -u root -p

Change Password

mysql> SET PASSWORD = PASSWORD('123456'); 

4. Error report

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

It means that the password you set is not complicated enough. It’s better to use numbers + letters + special characters

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

It’s still good to log in to MySQL (server version: 5.7.11) yesterday. The following error will be reported when executing any command after logging in today

mysql> help contents
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> help contents
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> show databases;
Error 1820 (HY000): you must reset your password using alter user statement before executing this statement

Or

MySQL > set password = password (“youpassword”);
2. Refresh permissions
MySQL > flush privileges;

MySQL > help contents
you asked for help about help category: “contents”
for more information, type ‘help < item >’, where < item> is one of the following
categories:
Account Management
Administration
Compound Statements
Data Definition
Data Manipulation
Data Types
Functions
Functions and Modifiers for Use with GROUP BY
Geographic Features
Help Metadata
Language Structure
Plugins
Procedures
Storage Engines
Table Maintenance
Transactions
User-Defined Functions
Utility
mysql>

Done!