Getting root access to new install of PHPMyAdmin

Tutorial Difficulty Level    

Immediately after doing a fresh install on LAMP on a barebones Linux Server using Xen Orchestra or otherwise), you should secure your database before going into production.

The command to do this is

and be sure to create a password for the root user (blank by default in newer MySQL versions).

Now, open your web browser and login to the server IP address followed by /phpmyadmin eg.

Still can’t login? No prob. You should be able to login at the command line, like so:

Give your root password and then execute the following at the mysql prompt:

Now do

and you should now be able to login to PHPMyAdmin as the root user. What you should NOW do is create a user (and database) for use with your application eg. WordPress. Never use the root user for your web application!