mysql 5.7密码策略修改
1、查看当前的密码策略
show variables like 'validate_password%';
2、密码策略的各项值
validate_password_dictionary_file:密码策略文件,策略为STRONG才需要
validate_password_length:密码最少长度
validate_password_mixed_case_count:大小写字符长度,至少1个
validate_password_number_count :数字至少1个 validate_password_special_char_count:特殊字符至少1个
3、修改策略
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
4、重置密码
alter user 'root'@'localhost' identified by '123456';