Changing MySQL username and password used by PHPMyAdmin

So, I had to do this the other day and I got a bit confused. After poking around a bit, I finally found it. If you have xampp installed, go to the install directory. In my case, this directory is C:xampp which is the default directory. Locate the phpmyadmin folder and open it. Locate the config.inc.php file within the phpmyadmin folder. Open up the file. You need to make change in the following two lines:

$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = 'password'

The underlined parts are the ones that you’ve got to change. This file contains a lot of admin stuff so make sure you look around a bit and understand what it does.

If you don’t know what you are doing, ensure you take a backup of the file before changing things.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.