This tutorial will clarify with necessary illustrations and figures how to avoid #1045 error using WAMP server. For other servers like LAMP, this tutorial may not be helpful. When you install WAMP and try to connect MySQL server using phpMyAdmin for the first time then MySQL refuses the connection displaying #1045 error. It is look like the figure below
Procedure to Troubleshoot
Here are few steps that must be followed carefully
First of all make sure that the WAMP server is running if it is not running, start the server.
Create a folder named config inside C:wampappsphpmyadmin, the folder inside apps may have different name like phpmyadmin220.127.116.11
Return to your browser in phpmyadmin setup tab, and click New server.
Change the authentication type to ‘cookie’ and leave the username and password field empty but if you change the authentication type to ‘config’ enter the password for username root.
Again click save in configuration file option.
Now navigate to the config folder. Inside the folder there will be a file named config.inc.php. Copy the file and paste it out of the folder (if the file with same name is already there then override it) and finally delete the folder.
Now you are done. Try to connect the mysql server again and this time you won’t get any error.
SHARE Troubleshooting MySQL error #1045 using WAMP