Support » Localhost Installs » can't connect to MySQL server on (1006)

  • Spent all day trouble shooting my new installation of wordpress on my Windows Server 2003 and can not get WordPress to connect to MySQL.

    I am running MySQL 5.5.16 and it seems to be working. The connection and server instance are set up and the test function says the setup parameters are correct. The only thing that looks odd is that in the Admin area of workbench it says”Host: Not Set” but it shows all the activity graphs etc.

    Windwos is running MySql as a service

    PHP knows where MySQL is and that it is running

    Nslookup resolves to localhost

    telenet to localhost 3306 creates a connection

    and I can run MySql commands from the command line.

    But everytime it run wp-admin/install.php I get an error. I have tried all kinds of settings and nothing works.

    Anyone know how to fix this? After eight hours of fighting this I am tapped out of ideas.


Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello Mbrsolution.

    Thanks for the note.

    I tried you links, and found no solution. I still get the same maddening error. I even tried to connect by defining an data source in the Admin section just to test a connection to the MSQL database, and no go. I am beginning to think there is something wrong with user permissions for the user I set up.

    Is anyone familiar with what permissions should be set up for WordPress database user for Windows Server.

    In any event, more hours today and still can’t connect.

    Yet the server is running. When I do a command line MySqladmin variables it lists the correct host and port.

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Full permissions. Read/write to all tables on the DB.

    Can you install something like PHPMyAdmin to connect to the DB?

    I have discovered that when I ping localhost I get the following:
    localhost ::1:

    it resolves to the above instead of

    I checked on our other windows server 2003 and when I ping

    I can not figure out why the WordPress web server when I ping localhost is resolving

    localhost ::1:

    Anyone ever come across this? Windows server 2004 sp2 is running on both machines, but give different ping results. Both are on the same subnet.

    Hi, I did a search on Google and this is what someone pointed out to be in their scenario..

    Wonderful!!!! It was because someone installed IPv6 and the localhost
    for IPv6 is now ::1.
    Uninstalling IPv6 fixed it!!!

    Many thanks! 🙂

    I hope this helps you

    Dear Mbrsolution:

    Wonderful indeed!! Great detective work on Google.

    Localhost was resolving to ::1

    I went to server admin and checked. IPv6 was installed, but according to the checkmark, it was not enabled. I uninstalled IPv6 anyway.

    (be aware, if you are using a remote connection you will be dropped and will have to be on site to physically reboot the server)

    After reboot, I checked with ping

    Localhost is now resolving to

    Then ran wp-admin/install.php. Had to go back and manually create the config file. Ran install again, and SUCCESS!!

    WordPress now installed and ready to begin set up.

    Thank you for your help. You should keep this fix close in your bag of tools.


    Hello Hammer02 I am happy that I was able to help you. Thank you for your kind words

    Kind regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘can't connect to MySQL server on (1006)’ is closed to new replies.