My Setup:
Windows XP (have all the service packs installed)
PHP 4.3.1
MYSQL 3.23.55
OrionSever 1.5.2b

When PHP attempts to access MYSQL, I get the following error:
Warning mysql_connect() [function mysql-connect]: Can't create TCP/IP socket (10106) in ......

Does anyone know how to resolve this issue?

Thanks... Sam.

    Originally posted by r00s2er
    My Setup:
    Windows XP (have all the service packs installed)
    PHP 4.3.1
    MYSQL 3.23.55
    OrionSever 1.5.2b

    When PHP attempts to access MYSQL, I get the following error:
    Warning mysql_connect() [function mysql-connect]: Can't create TCP/IP socket (10106) in ......

    Does anyone know how to resolve this issue?

    Thanks... Sam.

    What does your connection string look like:

    ie: mysql_connect("localhost", "username", "password");

    I've noticed I get this error alot when I try to connect to the FQDN , but when I use localhost, it worked fine.. 🙂

      my connection string looks like...

      $dbh = mysql_connect("localhost", "username", "password") or die( sql_error() );

      I think i have tried using the domain name also, but received the same error.

      Is it right to assume my problem exists in one of the settings in the PHP.ini or MY.ini files?

      THanks.

        4 years later

        I've had a similar issue to this one. I'm setting up PHP 5.1.6 on IIS 6.0 running on a Windows 2003 R2 Server with an x64 bit architecture. Have had to do quite a bit of fiddling to get IIS working with PHP, but all is going well now save for this issue. When trying to connect to MySQL using any library, you receive this 'Can't create TCP/IP socket' error. I've looked around, and tried everything from setting the server's SYSTEMDIR folder in PATH settings to turning on 'enable named-binding' in the my.ini file. Root can access anything from anywhere, but individual users are unable to access the database on the server.

        Anyone know of any solutions to this?

          Try disabling all third party "Personal firewall" products, then try again.

          Mark

            I'm not sure about the other poster, but my server has no firewall services/programs running on it.

            • Andy
              Write a Reply...