How to Change phpMyAdmin Password?

You might be started working with the phpMyAdmin just a few days back by setting up the username and password. Then at one point in time, you feel like you want to change the root password in phpMyAdmin and you don’t know how to do it.

Don’t worry, we are here to help you. Just read this article and understand how to change the root password in phpMyAdmin.

Steps to change root password in phpMyAdmin

Step 1: Log in to your phpMyAdmin, don’t select any database on the page

phpmyadmin login

Step 2: Select the “User accounts” tab in the main menu. You will be able to see all the user accounts and their privileges

user accounts

Step 3: Check the user “root” whose hostname is localhost. Click the “Edit Privileges” link

edit priveliges

Step 4: Once you click on to that link, it will direct you to the Global privileges page, On that page, you will find the “Change Password” tab.

Step 5: Click the change password tab and enter your new password in the given text area. You can even click the “Generate Password” button to randomly display a password for you. Finally, click the “Go” button to apply the changes.

changed password

Step 6: Next move on to C:\xampp\phpMyAdmin and find the “Config.inc.php” file. Open that file and find the line $cfg[‘Servers’][$a][‘auth_type’] = ‘config’;

It will be like

$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ‘’;

Now changes the line as given below and enter your password,

$cfg[‘Servers’][$a][‘auth_type’] = ‘cookie’;

$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ‘password_name’;

 

configuration file

Step 7: Finally open the web browser and type localhost/phpMyAdmin. Enter the username as root and password which you set just before and click the Go button. If your new password is set, it will directly lead inside the phpMyAdmin page.

updated login

Conclusion

Setting up and Changing the root password in phpMyAdmin is as simple as possible. Even beginners can do it with just a few clicks. Hope you understood how to change the root password in phpMyAdmin. If you have any queries or suggestions, please feel free to comment to us.

You may also like these articles

You can subscribe to us on Facebook and Twitter.

1 thought on “How to Change phpMyAdmin Password?”

  1. I only took 1 to 5 steps – after that, I logged out and now I cannot log into my phpMyadmin-What can I do?

    Reply

Leave a Comment