Monday, April 23, 2012

Troubleshooting MySQL error #1045 using WAMP

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
MySQL Error 1045
Procedure to Troubleshoot

Here are few steps that must be followed carefully
  1. First of all make sure that the WAMP server is running if it is not running,  start the server.
  2. Enter the URL http://localhost/phpmyadmin/setup in address bar of your browser.
  3. Create a folder named config inside C:\wamp\apps\phpmyadmin, the folder inside apps may have different name like phpmyadmin3.2.0.1
  4. Return to your browser in phpmyadmin setup tab, and click New server.NewServer
  5. 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.
  6. Click save
  7. Again click save in configuration file option. saveFile
  8. 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.
  9. Now you are done. Try to connect the mysql server again and this time you won’t get any error.

7 comments:

  1. Thank you so much, very helpful articles

    ReplyDelete
  2. Thank you very very much. I tried a million ways but only yours worked!!

    ReplyDelete
  3. Thank you so much,tôi yêu bạn

    ReplyDelete
  4. Hello, I did all these steps, now, I can type user and password, but it shows the error #1045. maybe I have other error because the wampserver's icon on windows is orange. should it be green? I hope someone can help me

    ReplyDelete
  5. Hello sir,
    i am working on mini project that iscollege management system . so i need ur help to implement that project in correct manner.
    so please give me reply as early as possible on my mail jayukolhe4@gmail.com

    ReplyDelete
  6. How to troubleshoot with MAMP server please?

    ReplyDelete