use mysql;
select user, host from user;
update user host = '%' where user = 'ljy'
# 更改加密方式
mysql> ALTER USER 'ljy'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
# 更改密码:该例子中 123456为新密码
mysql> ALTER USER 'ljy'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
# 刷新:
mysql> FLUSH PRIVILEGES;