1.update user set authentication_string =password("root") where user ='root' and host='localhost';
2.update user set password =password("rootroot") where user ="root";
3.set password=password('rootroot');
4.alter user root identified by 'root' password expire never;
因为版本不同,可能不同的语句才能生效。多试试即可。