#查看初始密码策略
SHOW VARIABLES LIKE 'validate_password%';
#设置密码安全等级为LOW set global validate_password_policy=LOW; #设置必须包含大小写字数量符为0 set global validate_password_mixed_case_count = 0; #设置必须包含特殊字符数量为0 set global validate_password_special_char_count = 0; #设值必须包含数字的数量为0 set global validate_password_number_count = 0; #修改mysql密码为123 alter user root@localhost identified by '123'; #授权root用户可以在任意IP使用密码123登录 grant all privileges on *.* to 'root'@'%' identified by '123' with grant option; #刷新权限 flush privileges;