alter user ‘root‘@‘%‘ identified by ‘xxxx‘;
alter user ‘root‘@‘localhost‘ identified by ‘xxxx‘;root@后面是user表的Host字段的内容,新安装默认是localhost,我这增加了远程访问,将localhost手动改成了%改完了之后需要执行
flush privileges;
mysql8.0+修改用户密码
原文:https://www.cnblogs.com/JimmyBright/p/9903203.html