-- 修改密码为用不过期 mysql> ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; Query OK, 0 rows affected (0.02 sec) -- 修改密码并指定加密规则为mysql_native_password mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; Query OK, 0 rows affected (0.01 sec) -- 刷新权限 mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql>
修改策略项
set global validate_password_policy=0; // 密码策略等级改为低
set global validate_password_mixed_case_count=0; // 取消大小写混合
set global validate_password_special_char_count=0; // 特殊字符数量设置为0
set global validate_password_length=6; // 密码最小长度改为6