|  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
 [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'

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


Add a Patch

Pull Requests

Add a Pull Request


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.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 23:01:27 2023 UTC