mysql> grant all privileges on prodhub.* to yearning@'172.20.0.41' identified by '0tWjVrcpGBsgFzql';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
如上所示 创建用户密码报错
解决办法:
mysql配置密码规则
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 |
+--------------------------------------+--------+
mysql> SET GLOBAL validate_password_policy=0 ;
Query OK, 0 rows affected (0.00 sec)
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 | LOW |
| validate_password_special_char_count | 1 |
+--------------------------------------+-------+
7 rows in set (0.01 sec)
mysql> grant all privileges on prodhub.* to yearning@'172.20.0.40' identified by '0tWjVrcpGBsgFzql';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> SET GLOBAL validate_password_policy=1;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on prodhub.* to yearning@'172.20.0.41' identified by '0tWjVrcpGBsgFzql';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
说明:
修改密码验证安全强度(插件)
SET GLOBAL validate_password_policy=LOW;
SET GLOBAL validate_password_policy=MEDIUM;
SET GLOBAL validate_password_policy=STRONG;
SET GLOBAL validate_password_policy=0; // For LOW
SET GLOBAL validate_password_policy=1; // For MEDIUM
SET GLOBAL validate_password_policy=2; // For HIGH
修改密码验证安全强度(组件)
SET GLOBAL validate_password.policy=LOW;
SET GLOBAL validate_password.policy=MEDIUM;
SET GLOBAL validate_password.policy=STRONG;
SET GLOBAL validate_password.policy = 0; // For LOW
SET GLOBAL validate_password.policy = 1; // For MEDIUM
SET GLOBAL validate_password.policy = 2; // For HIGH