PHP + MySQL => Can't create TCP/IP socket (10106)
Posted on 2003-03-09
I’m trying to connect to a MySQL database from my PHP code, but I keep getting the following error message: Can't create TCP/IP socket (10106)
This is my code:
$connection = mysql_connect("127.0.0.1", "root") or die ("Unable to connect!");
And this is the complet error message:
Warning: mysql_connect() [function.mysql-connect]: Can't create TCP/IP socket (10106) in D:\xxxx\index.php on line 18
Unable to connect!
This is the MySQL part of my php.ini
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_socket = mysql
mysql.connect_timeout = -1
mysql.trace_mode = Off
I’m running Windows 2000 Server, Orion 1.5.2 as web/application server, MySQL 3.23.55-nt and PHP 4.3.1 (installed from the windows installer file)
I have no problem connecting to the database from JSP on the same server.
I have read a few messages from others having problems like this, but I have not found any solution.
Hope someone can help me!