mysql 8.0以上版本用户密码修改

执行以下命令:
mysql -uroot -p
use mysql; 
update user set authentication_string='' where user='root'; //将 authentication_string 置空
alter user 'root'@'%' identified by 'newpassword';
flush privileges;
注:在 mysql 8.0 以上版本这两条命令已经不起作用了:
1、update mysql.user set password='newpassword' where user='root';
2、update mysql.user set password=PASSWORD('newpassword') where User='root';