ERROR 1819 (HY000): Your password does not satisfy the current policy requirements问题解决

When operating the database, it prompts ERROR 1819 (HY000): Your password does not satisfy the current policy requirements.
The reason is that Mysql has added a password strength verification plug-in: validate_password. The reason for checking on the Internet is that the password set is too simple, so this problem occurs, but I set it very complicated, which is inexplicable (`・ω・´)

Solution:
Enter mysql and enter the following commands in order to solve the problem:

mysql> SHOW VARIABLES LIKE ‘validate_password%’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '‘validate_password%’' at line 1
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_mixed_case_count=0;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_number_count=3;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_special_char_count=0;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_length=3;
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> 

Guess you like

Origin blog.csdn.net/qq_34316431/article/details/119003853