1、进入mysql ,密码输入当前密码
mysql -u root -p
select User from user; #此处为查询用户命令
2、修改账户密码加密规则并更新用户密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "root";
或
update mysql.user set authentication_string=password('*******') where user='*******'; #修改密码成功
3、刷新权限,重置密码
FLUSH PRIVILEGES;