After installing WAMP Server it is common when you first access phpMyAdmin to get the following message:
“Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user ‘.root’.”
To correct this security issue you need to do the following:
- Go to phpMyAdmin
- Select the Privileges tab
- Locate the user “root” that has ruifeio.com for a host
- Edit the root user privileges by clicking on the corresponding Edit Privileges button
- On the Change Password section insert the desired password and press Go
- You should now have at the top of the screen the message: “The password for ‘root’@’ruifeio.com’ was changed successfully.“
- Now you need to edit file config.inc.php normally located at C:\wamp\apps\phpmyadmin3.2.0.1 (note that the version indication may vary)
- Locate $cfg[‘Servers’][$i][‘auth_type’] = ‘config’; and change from config to cookie so that you get a login window every time you access phpMyAdmin
- Locate $cfg[‘blowfish_secret’] = ‘ ‘; line. If you don’t have one add it to your config.inc.php file
- Add a secret passphrase to $cfg[‘blowfish_secret’] = ‘ ‘; for example: $cfg[‘blowfish_secret’] = ‘secret_pass’;
- Save your changes
- Go to the WAMPServer and select Restart All Services
- Once all the services have been restarted go to phpMyAdmin and enter the username root and your password to access phpMyAmdin
Notes:
- The blowfish_secret passphrase should not be the same as the root password.
- If you don’t add a $cfg[‘blowfish_secret’] line to the config.inc.php file, when you access phpMyAdmin you’ll get the message: “The configuration file now needs a secret passphrase (blowfish_secret).“
If you’re interested in learning more about PhpMyAdmin then check out the book “Mastering PhpMydmin for Effective MySQL Management“.