USE mysql; UPDATE user SET authentication_string = PASSWORD('newpasswd') WHERE user = 'root' AND host = '%'; FLUSH PRIVILEGES;