Yeah, I guess I left out some important details....
I'm running Windows XP with Apache 2.0.53, PHP 5, and mySQL 4.1
The error I get:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 5
I copied libmySQL.dll to c:\php and php_mysql.dll is in c:\php\ext. I have a reference to both dlls in my PATH. "LoadModule php5_module "c:/php/php5apache2.dll"" is in httpd.conf and the dll exists at that location.
This is the PHP I've been using:
if (!mysql_connect(":/mysql", "", ""))
echo "MySQL error<br />";
else
echo "Connected to MySQL<br />";
In place of ':/mysql' I've also tried 'localhost', among many other things. I'm not sure how to determine what this should be for a named pipe.