Step 1: Go to phpMyAdmin localhost or type "http://localhost/phpmyadmin" into your browser URL and press enter, you can see following screen.
Step 2: Click on "User accounts" top menu then below screen will be appear. Now click on "Edit privileges".
Step 3: Click on edit privileges will bring the following screen and now click on "Change password"
Step 4: Click on "Change password" button will bring below screen to change your password. Enter your new password along with confirm password then click "Go". It'll save your new password into database.
Step 5: If you try to access your phpMyAdmin now then it will not work and you'll get below message:
Step 6: You need to change a configuration file from xampp installation directory. Go to xampp folder then phpMyAdmin folder now you'll get a file name config.inc.php. Below screenshot will help you to find the config file.
Step 7: Open the file with any editor and now you need to change two values.
Before you changes the config file here are the values: auth_type was set "config" when no password is required to login into phpMyAdmin and also password value was blank. But we want to set password now so you need update your auth_type to "cookie" and in password field you need to change your password according to need.
Before:
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
After:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'set your password';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
Step 8: Save the file and you're DONE. Now you can access your phpMyAdmin with password. Enter your new password along with username root.
0 Comments