ALTER USER test@'%' IDENTIFIED BY '123456';
https://www.cnblogs.com/paul8339/p/9054497.html
更改用户名密码,官方推荐使用alter
ALTER USER test@'%' IDENTIFIED BY '123456';
还有一种
update mysql.user set authentication_string=password("新密码") where User="test" and Host="localhost"; 用update语句需要flush privileges;
参考
MySQL 5.7推荐使用ALTER USER修改密码 https://majing.io/posts/10000005531181
MySql 5.7中添加用户,新建数据库,用户授权,删除用户,修改密码 - Pkj - 博客园 https://www.cnblogs.com/pkjplayer/p/7681281.html