php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2453 MySQL connection failed:Can`t connect to local
Submitted: 1999-10-06 10:41 UTC Modified: 1999-10-06 11:18 UTC
From: station7 at hotmail dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.9 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 - 3 = ?
Subscribe to this entry?

 
 [1999-10-06 10:41 UTC] station7 at hotmail dot com
Trying to connect to MySQL with PHP, get error:

MySQL Connection Failed: Can't connect to local 
MySQL server through socket '/var/lib/mysql/mysql.sock'
(111)

MySQL works fine on own.  PHP works.  But can`t
connect to MySQL with PHP.

running MySQL 3.22.22, PHP 3.0.9, Apache 1.3.6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-06 11:18 UTC] rasmus at cvs dot php dot net
Your MySQL client library and your installed MySQL server don't agree on where the MySQL socket is located.
In recent versions of PHP you can specify the location of this Unix Domain socket in the mysql_connect() call.
See http://www.php.net/manual/function.mysql-connect.php3
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 21:01:33 2024 UTC