Hi everyone, I've just installed Apache 1.3.24 and PHP 4.1.2 ( as a module ) and mySQL 3.23.49 on a Windows 2000 workstation. I didn't encounter any problems with the install, but for some strange reason whenever I use any scripts with mysql_connect("localhost", "user", "password") I get Warning: Can't connect to MySQL server on 'localhost' (10061) errors
Now the strange thing is that if I remove the "localhost" and replace it with "" everything will work fine. I've tried downgrading mySQL and PHP to several different versions with the same results. This isn't the first time i've installed this kind of setup on a win2k machine, but it's the first time I've had this problem. Any help would be really appreciated. Sample script : <?php //list_db.php $link_id = mysql_connect("localhost", "user", "password"); $result = mysql_list_dbs($link_id); $num_rows = mysql_num_rows($result); while($db_data = mysql_fetch_row($result)) { echo $db_data[0]. "<BR>"; $result2 = mysql_list_tables($db_data[0]); $num_rows2 = mysql_num_rows($result2); while($table_data = mysql_fetch_row($result2)) echo "--" . $table_data[0]. "<BR>"; echo "==> $num_rows2 table(s) in " . $db_data[0] . "<P>"; } ?> Resulting errors : Warning: Can't connect to MySQL server on 'localhost' (10061) in c:\webdev\www\index.php on line 4 Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10061) in c:\webdev\www\index.php on line 4 Warning: Supplied argument is not a valid MySQL-Link resource in c:\webdev\www\index.php on line 5 Warning: Supplied argument is not a valid MySQL result resource in c:\webdev\www\index.php on line 6 Warning: Supplied argument is not a valid MySQL result resource in c:\webdev\www\index.php on line 8 _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php