标签:验证 密码 文件 nal select ali 配置 erro 查看
今天创建mysql用户时报了这个错误:
mysql> CREATE USER ‘canal‘@‘%‘ IDENTIFIED BY ‘canal‘;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
可知是根据当前mysql创建用户对密码的安全性校验没通过.
SHOW VARIABLES LIKE ‘validate_password%‘;
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.01 sec)
可见创建用户密码对密码长度以及数字数量以及字母大小写混合都有要求,由于我这是测试环境,就将密码政策修改为low:
SET GLOBAL validate_password_policy = low;
SET GLOBAL validate_password_number_count=0
SET GLOBAL validate_password_length = 5;
测试结果:
mysql> SHOW VARIABLES LIKE ‘validate_password%‘;
+--------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------+-------+
| validate_password_check_user_name | OFF |
| validate_password_dictionary_file | |
| validate_password_length | 5 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 0 |
| validate_password_policy | LOW |
| validate_password_special_char_count | 1 |
+--------------------------------------+-------+
7 rows in set (0.01 sec)
mysql> CREATE USER ‘canal‘@‘%‘ IDENTIFIED BY ‘canal‘;
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT SHOW VIEW, SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO ‘canal‘@‘%‘;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Your password does not satisfy the current policy requirements
标签:验证 密码 文件 nal select ali 配置 erro 查看
原文地址:https://www.cnblogs.com/Courage129/p/14055515.html