|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-09-27 08:20 UTC] neil dot walker at syntegra dot com
If I do:
$user="frank";
$pwd="skinner";
$db="db.cp-productions.f2s.com:walkern";
The following works fine:
$conn = mysql_connect("db.cp-productions.f2s.com:walkern", $user, $pwd);
If I do:
$conn = mysql_connect($db, $user, $pwd);
The following error occurs:
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /web/sites/253/walkern/www.cp-productions.f2s.com/inc/news.php
I think it's something to do with the ':walkern' bit. It works ok on my other site where I have $user="localhost".
I've tried putting it in quotes, etc.
I have tried it on a 4.06 and a 4.01 build (different ISP's) and both do the same.
Neil.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 09:00:01 2025 UTC |
If I do: $user="frank"; $pwd="skinner"; $db="db.cp-productions.f2s.com:walkern"; The following works fine: $conn = mysql_connect("db.cp-productions.f2s.com:walkern", $user, $pwd); If I do: $conn = mysql_connect($db, $user, $pwd); The following error occurs: Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /web/sites/253/walkern/www.cp-productions.f2s.com/inc/news.php I think it's something to do with the ':walkern' bit. It works ok on my other site where I have $db="localhost". I've tried putting it in quotes, etc. I have tried it on a 4.06 and a 4.01 build (different ISP's) and both do the same. Neil.