1.没有密码的情况下修改密码:
mysqladmin -u root password "newpassword"
2.知道密码的情况下修改密码:
mysqladmin -u root password oldpass "newpass"
^_^