alter user 'root'@'localhost' identified by 'mynewpass' code example Example: alter user root mysql ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';