php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10585 Php can't connect to MySQL database
Submitted: 2001-05-01 14:22 UTC Modified: 2002-03-11 17:23 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ken at synagy dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.5 OS: redhat 7
Private report: No CVE-ID: None
 [2001-05-01 14:22 UTC] ken at synagy dot com
mysql version  3.23.33 All MySQL connections are broken error:

Warning: MySQL Connection Failed: Can't connect to local MySQL server
             through socket '/tmp/mysql.sock' (111) in
             /home/httpd/html/ion/ion/connect.php on line 4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-01 14:53 UTC] hholzgra@php.net
most likely a configuration error

ask a support forum like php-general@lists.php.net
 [2001-05-01 20:24 UTC] sniper@php.net
There was a bug in the configure. Should be fixed in CVS
now.

--Jani

 [2002-03-06 15:38 UTC] php dot ini at mysql dot sock dot com
Edit the mysql socket entry in the php.ini file and restart the httpd.

Try this:

mysql.default_socket = /var/lib/mysql/mysql.sock
 [2002-03-06 22:14 UTC] yohgaki@php.net
And what is your PHP version?
 [2002-03-11 15:53 UTC] troyrock at rocketmail dot com
The security patch from redhat apparently causes this problem (possibly among other things).  Editing the socket entry in the php.ini file fixes the problem.  My version is 4.0.6-12.
 [2002-03-11 17:23 UTC] sniper@php.net
This is fixed.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC