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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: station7 at hotmail dot com
New email:
PHP Version: OS:

 

 [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 23:01:30 2024 UTC