#修改加密规则
ALTER USER ‘root‘@‘%‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER;
#更新一下用户的密码
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘password‘;
#刷新权限
FLUSH PRIVILEGES;
#重置密码
alter user ‘root‘@‘%‘ identified by ‘123qwe‘
注意:上面 % 是设置远程连接,本地连接设为localhost即可