Mysql密码安全策略

Server version: 5.7.9-log MySQLCommunity Server (GPL)

 

mysql> GRANT REPLICATION CLIENT ON *.*TO 'zabbix'@'%' IDENTIFIED BY ‘xxxxxxxx’;

ERROR 1819 (HY000): Your password does notsatisfy the current policy requirements

 

这个与validate_password_policy的值有关。

validate_password_policy有以下取值:

 

Policy

Tests Performed

0 or LOW

Length

1 or MEDIUM

Length; numeric, lowercase/uppercase, and special characters

2 or STRONG

Length; numeric, lowercase/uppercase, and special characters; dictionary file

 

 

 

默认是1  符合长度,且必须含有数字,小写或大写字母,特殊字符。



如果是测试环境不想密码很复杂,可以修改:

 

set global validate_password_policy=0;

 

mysql> GRANT REPLICATION CLIENT ON *.* TO 'zabbix'@'%' IDENTIFIED BY 'xxxxxxxx';

Query OK, 0 rows affected, 1 warning (0.02sec)

 

 

更改密码长度:密码最小长度为4
mysql> set global validate_password_length=0

Query OK, 0 rows affected (0.00 sec)

mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+-------+
| Variable_name                       | Value |
+--------------------------------------+-------+
| validate_password_dictionary_file    |       |
| validate_password_length             | 4    |
| validate_password_mixed_case_count   | 1     |
| validate_password_number_count       | 1     |
| validate_password_policy             | LOW  |
| validate_password_special_char_count | 1     |
+--------------------------------------+-------+
6 rows in set (0.00 sec)

你可能感兴趣的:(Mysql密码安全策略)