MySQL: Change the root password


One of the good habits of the security aware administrator is to regularly change password on critical system accounts. If you have a MySQL Server installed, then the MySQL root account definitely belongs in this group.

During the installation of MySQL Server you (hopefully) changed the default password from *blank* into something more hard to guess. You did this with this command: # mysqladmin -u root -p new_password In order to change password you simply do the same only that you need to verify the change with the current password. # mysqladmin -u root -p new_password Enter password: old_password