how to change root password in phpmyadmin

Steps to change root password in phpMyAdmin

You might be started working with the phpMyAdmin just a few days back by setting up the username and password. Then at one point of them, 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: Login to your phpMyAdmin, don’t select any database in the page

Web Hosting

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 at Facebook and Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *

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