查看当前密码策略
show variables like 'validate_password%';
策略内容:
validate_password_length #密码长度
validate_password_mixed_case_count #大小写字符个数
validate_password_number_count #数字个数
validate_password_special_char_count #特殊字符个数
使用set global修改策略的参数值
mysql> set global validate_password_length=6;
mysql> set global validate_password_mixed_case_count=0;
mysql> set global validate_password_special_char_count=0;
mysql> flush privileges;
查看策略
show variables like 'validate_password%';
修改密码
mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
is ok