# 先设置一个符合策略的密码
alter user 'root'@'localhost' identified by 'Abc123...';# 修改校验密码策略等级set global validate_password.policy=LOW;# 设置密码长度至少为6set global validate_password.length=6;# 再设置为123456
alter user 'root'@'localhost' identified by '123456';# 刷新系统权限相关表
flush privileges;# 开启远程访问
use mysql;
UPDATE user SET host='%' WHERE user ='root';# 刷新系统权限相关表
flush privileges;