1.进入到cmd,切换到mysql服务器路径
2.在命令行中输入命令【mysql -hlocalhost -uroot -p 按回车键,输入密码】,其中【-h主机名 -u用户 -p密码】
3.执行命令 alter user 'root'@'localhost' identified with mysql_native_password by '123456';
其中'root' 为需要刷新的用户 ‘localhost’ 代表本机,若为远程可连接用户,替换为‘%’
‘123456’ 为需要刷新用户对应的密码
4.执行命令flush privileges;