方法一:
进入命令行模式
MysqL -u root -p
MysqL>use MysqL;
MysqL> UPDATE user SET password=PASSWORD("new password") WHERE user='username';
MysqL> FLUSH PRIVILEGES;
MysqL> quit;
方法二:
MysqL -u root -p
MysqL>use MysqL;
MysqL> SET PASSWORD FOR username=PASSWORD('new password');
MysqL> QUIT
方法三:
MysqLadmin -u root "old password" "new password"
注:new password请输入你想要设置的密码。