WordPress.org

Ready to get started?Download WordPress

Forums

can't connect to MySQL server on 127.0.0.1 (1006) (8 posts)

  1. Hammer02
    Member
    Posted 2 years ago #

    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 127.0.0.1 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.

    Thanks.

  2. mbrsolution
    Member
    Posted 2 years ago #

  3. Hammer02
    Member
    Posted 2 years ago #

    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.

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

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

  5. Hammer02
    Member
    Posted 2 years ago #

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

    it resolves to the above instead of 127.0.0.1

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

    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.

  6. mbrsolution
    Member
    Posted 2 years ago #

    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! :-)
    grol

    I hope this helps you

  7. Hammer02
    Member
    Posted 2 years ago #

    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 127.0.0.1

    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.

    Hammer

  8. mbrsolution
    Member
    Posted 2 years ago #

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

    Kind regards

Topic Closed

This topic has been closed to new replies.

About this Topic