查看加密规则
select host,user,plugin from user;
临时修改密码策略
SHOW VARIABLES LIKE ‘validate_password%‘;
set global validate_password.policy=0;
set global validate_password.mixed_case_count=0;
set global validate_password.number_count=0;
set global validate_password.special_char_count=0;
set global validate_password.length=4;
修改加密方式
update user set plugin=‘mysql_native_password‘ where user=‘root‘;
修改密码
alter user ‘root‘@‘%‘ identified with mysql_native_password by ‘123456‘;
设置远程登录
update user set host = ‘%‘ where user = ‘root‘;
刷新权限
FLUSH PRIVILEGES;
原文:https://www.cnblogs.com/goblog/p/14770531.html