#35292 [Opn->Fbk]: Can't connect to local MySQL server through socket
| From: | sniper@php.net | Date: | Sun, 20 Nov 2005 07:52:23 +0000 |
| Subject: | #35292 [Opn->Fbk]: Can't connect to local MySQL server through socket | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88570@lists.php.net to get a copy of this message | ||
ID: 35292
Updated by: sniper@php.net
Reported By: dgrimes at scvl dot com
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: SCO OpenServer
PHP Version: 4.4.1
New Comment:
Are you sure that path to the socket is correct?
Previous Comments:
------------------------------------------------------------------------
[2005-11-19 14:58:53] dgrimes at scvl dot com
Still have the same problem with the latest snapshot.
Dean
------------------------------------------------------------------------
[2005-11-19 14:25:17] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-11-19 14:18:21] dgrimes at scvl dot com
Description:
------------
I am having random failure on making a connection to MySQL. This the
code used to make the connection and has been for several years.
if (!$this->linkid =
mysql_connect($this->host,$this->user,$this->pass))
DBError(mysql_errno(),mysql_error(),"LINKID-$db",$this->mailerr,$this->sendto);
The following error is returned randomly however it happens usually
right after starting apache or after a period of inactivity:
2002 - Can't connect to local MySQL server through socket
'/d/mysql/var/mysql.so
ck' (-2146870980)
Starting with version PHP 4.3.0 is when the problem started. Version
4.2.x does not have this problem. I compiled every version until I
found where the problem started. I am currently trying to move from
4.0.6 to 4.4.1 but need to get this issue addressed.
My system:
SCO OpenServer 5.0.4 and 5.0.6
MySQL 4.1.15
Apache 1.3.34
Reproduce code:
---------------
if (!$this->linkid =
mysql_connect($this->host,$this->user,$this->pass))
DBError(mysql_errno(),mysql_error(),"$this->linkid
LINKID-$db",$this->m
ailerr,$this->sendto);
Expected result:
----------------
I expected to get a resource ID returned.
Actual result:
--------------
2002 - Can't connect to local MySQL server through socket
'/d/mysql/var/mysql.so
ck' (-2146870980)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35292&edit=1