problem ERROR 1819 (HY000): Your password does not satisfy the current policy requirements. To enhance security, MySQL5.7 randomly generated a password for root user. In the error log, regarding the location of the error log, if the RPM package is installed, the default is /var/log/mysqld.log.
can generally be set by log_error
obtain temporary password of MySQL by # grep "password" /var/log/mysqld.log command
2016-01-19T05:16:36.218234Z 1 [Note] A temporary password is generated for root@localhost: WaQ,qR%be2(5
mysql> select user();
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
If
is simply changed to a simple password, the following error is reported:
mysql> ALTER USER USER() IDENTIFIED BY '12345678';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
The
is actually related to the value of validate_password_policy.
validate_password_policy has the following values:
default is 1, which is MEDIUM, so the password you set at the beginning must be length, and must contain Numbers, lowercase or uppercase letters, and special characters.
sometimes, just for testing purposes, I don’t want to make the password that complicated. For example, I just want to set root’s password to 123456.
must modify two global parameters:
First, change the value of the validate_password_policy parameter
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
thus, the criteria for judging a password are based on the length of the password. This is determined by the validate_password_length parameter.
mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 8 |
+----------------------------+
1 row in set (0.00 sec)
The
validate_password_length parameter defaults to 8 and has a minimum value of
validate_password_number_count
+ validate_password_special_char_count
+ (2 * validate_password_mixed_case_count)
where validate_password_number_count specifies the length of the data in the password, validate_password_special_char_count specifies the length of the special characters in the password, and validate_password_mixed_case_count specifies the length of the size letters in the password.
these parameters have a default value of 1, so validate_password_length has a minimum value of 4. If you explicitly specify validate_password_length to be less than 4, it will not error, but validate_password_length will be 4. As follows:
mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 8 |
+----------------------------+
1 row in set (0.00 sec)
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 4 |
+----------------------------+
1 row in set (0.00 sec)
if you change validate_password_number_count, validate_password_special_char_count, and validate_password_mixed_case_count any value, then validate_password_length will be dynamically changed.
mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 4 |
+----------------------------+
1 row in set (0.00 sec)
mysql> select @@validate_password_mixed_case_count;
+--------------------------------------+
| @@validate_password_mixed_case_count |
+--------------------------------------+
| 1 |
+--------------------------------------+
1 row in set (0.00 sec)
mysql> set global validate_password_mixed_case_count=2;
Query OK, 0 rows affected (0.00 sec)
mysql> select @@validate_password_mixed_case_count;
+--------------------------------------+
| @@validate_password_mixed_case_count |
+--------------------------------------+
| 2 |
+--------------------------------------+
1 row in set (0.00 sec)
mysql> select @@validate_password_length;
+----------------------------+
| @@validate_password_length |
+----------------------------+
| 6 |
+----------------------------+
1 row in set (0.00 sec)
verify whether the validate_password plug-in is installed?You can view the following parameters, if not installed, the output will be empty.
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------+-------+
| validate_password_dictionary_file | |
| validate_password_length | 6 |
| validate_password_mixed_case_count | 2 |
| validate_password_number_count | 1 |
| validate_password_policy | LOW |
| validate_password_special_char_count | 1 |
+--------------------------------------+-------+
div>
Read More:
- ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- MYSQL:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- MySQL 8 — error in setting simple password error 1819 (HY000): your password does not satisfy the current policy requirements
- Error: the version of ZABBIX database does not match the current requirements
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- Error (1820) if the password is not changed in time after MySQL installation
- Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtim
- MySQL password setting error message: error 1054 (42s22): unknown column ‘password’ in ‘field list’
- Cmake[Warning]:Policy CMP0054 is not set
- Linux view current date and time
- Error 1364 (HY000): field ‘SSL_ cipher’ doesn’t have a default value
- How to terminate the current program under linux command line?
- configure: error: Package requirements (sqlite3 」 3.7.4) were not met:
- ERROR 1524 (HY000): Plugin ‘auth_socket’ is not loaded How to Fix
- Error 1064 in MySQL password change
- Mysql start slave error 1201 (HY000)
- Centos7 forgot the root password and could not log in to the system
- Solve MySQL error 2002 (HY000)
- Quartus ii 13.1 compilation does not pass: Error (119013): Current license file does not support the EP4CE10F17C8 device
- In depth analysis of mysq exceeding the number of connections error 1040 (HY000): too many connections