ALTER USER 'root'@'localhost' IDENTIFIED BY 'root-password';
or
SET PASSWORD FOR root = Password('root-password');