Here is a simple way to solve #1045 – Access denied for user ‘root’@’localhost’ (using password: NO) error…
Just follow the steps:
Note: [WAMP_PATH] is the path to the wampserver directory in your computer so it can be anything. Default (C:\wamp).
- First, go to [WAMP_PATH] > apps > phpmyadmin3.5.1.
- Then find and open config.inc.php in your text editor
- Now find $cfg[‘Servers’][$i][‘password’] = ”; and change it with $cfg[‘Servers’][$i][‘password’] = ‘admin’; (You can put anything in place of admin as your password, this is only a test password).
- Now find $cfg[‘Servers’][$i][‘AllowNoPassword’] = true; and replace it by $cfg[‘Servers’][$i][‘AllowNoPassword’] = false;.
- Thats it now save that file.
- Now restart the wampserver. To do this left-click the wamp icon in the windows taskbar (Notification one), a box will pop up then just click on Restart all Services.
Yeah! You have successfully resolved the error. If you face any error make sure to comment or email me.