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

Pull Requests

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: Thu Dec 12 00:01:28 2024 UTC