方法1:
mysql> update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
方法2:
mysql> alter user 'root'@'localhost' identified by '123';
方法3:
mysql> set password for 'root'@'localhost'=password('123');
刷新权限
mysql> flush privileges;