phpMyAdmin: Change the root password of phpmyadmin after a fresh installation on your server

User login

After a fresh install of phpMyAdmin, you can use your browser to login ( using the credentials root and empty passwort. Obviously this is a security hole that needs to be fixed asap. Not so obvious, however, is how.

Using your terminal (or Putty in Windows), you can use the following command to change the password for root:

/usr/local/mysql/bin/mysqladmin -u root password ’somepassword’

where ’somepassword’ is the password you have chosen for the root user of Mysql.