This is the temporary password used during MySQL initialization. When modifying the user-defined password, it does not comply with the password policy because the user-defined password is relatively simple.
mysql> update user set authentication_string=password('root') where user='root' -> ; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
terms of settlement:
1. View the initial password policy of MySQL and
enter the statement “show variables like ‘validate”_ password%’; ” View,
as follows:
mysql> SHOW VARIABLES LIKE 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password_check_user_name | OFF | | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | MEDIUM | | validate_password_special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.13 sec)
2. First, you need to set the authentication strength level of the password and set validate_ password_ If the global parameter of policy is low,
enter the setting statement “set global validate”_ password_ policy=LOW; ” Set values as follows:
mysql> set global validate_password_policy=LOW;
Query OK, 0 rows affected (0.03 sec)
3. The current password length is 8. If you don’t mind, you don’t need to modify it. Generally speaking, set it to a 4-digit password and set validate_ password_ The global parameter of length is 4,
Enter the set value statement “set global validate”_ password_ length=4; ” Set the value,
mysql> set global validate_password_length=4; Query OK, 0 rows affected (0.03 sec)
4. Now you can set a simple password for MySQL, as long as it meets the length of six digits,
enter the modification statement “update user set authentication”_ string=password(‘root’) where user=‘root’; ” You can see that the password policy has been modified successfully!!!
mysql> update user set authentication_string=password('root') where user='root'; Query OK, 1 row affected, 1 warning (0.03 sec) Rows matched: 1 Changed: 1 Warnings: 1
Read More:
- Linux (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
- MySQL password setting error message: error 1054 (42s22): unknown column ‘password’ in ‘field list’
- Cmake[Warning]:Policy CMP0054 is not set
- MySQL ERROR 1054 (42S22): Unknown column’password’ in’field list’ error
- Error 1364 (HY000): field ‘SSL_ cipher’ doesn’t have a default value
- configure: error: Package requirements (sqlite3 」 3.7.4) were not met:
- Unknown column ‘Password‘ in ‘field list‘
- Error 1045 (28000): solution to access denied for user ‘root’ @’localhost ‘(using password: no)
- Error 1064 in MySQL password change
- ERROR 1524 (HY000): Plugin ‘auth_socket’ is not loaded How to Fix
- Centos7 forgot the root password and could not log in to the system
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- Root password of windows 10 WSL Ubuntu system
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- MySQL forgot the root password