01.查询host
select host from user where user='root';
02.更新任意ip都可以连接
update user set host = '%' where user ='root';
03.刷新
flush privileges;
04.再次查询host
select host from user where user='root';
use mysql;
select user,plugin from user where user='root';
ALTER USER 'root'@'%' IDENTIFIED BY 'admin' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'admin';#修改密码
FLUSH PRIVILEGES;#刷新