mysql change root password with --skip-grant-tables code example Example: alter user root mysql ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';