php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29729 Can't connect to local MySQL
Submitted: 2004-08-18 13:02 UTC Modified: 2004-08-18 14:13 UTC
From: kil at systema dot ru Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.0.1 OS: Tru64 UNIX v 5.1A
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kil at systema dot ru
New email:
PHP Version: OS:

 

 [2004-08-18 13:02 UTC] kil at systema dot ru
Description:
------------
CC=cc
CXX=cxx
CFLAGS="-arch host"
CXXFLAGS="-arch host"
PHP is Apache-2.0.50 shared module

PHP-4.3.8 is OK.

Reproduce code:
---------------
<? mysql_connect("localhost", "user", "passwd"); ?>

Expected result:
----------------
Web page

Actual result:
--------------
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in ...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 13:16 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 [2004-08-18 13:21 UTC] kil at systema dot ru
In PHP-4.x.x such problem is only in case compilation with POSIX threads:
CC="cc -pthread"
CXX="cxx -pthread"
 [2004-08-18 13:27 UTC] derick@php.net
Believe me, you are doing something wrong compiling. (as we don't bundle the mysql client anymore and the default installed one might have different socket location compiled in). Please ask for suport about this on the mailinglists.
 [2004-08-18 13:40 UTC] kil at systema dot ru
I compiled PHP-5.0.1 such as PHP-4.3.8
PHP-4.3.8 is working
PHP-5.0.1 no
I can send configuration files by E-mail
 [2004-08-18 13:44 UTC] kil at systema dot ru
Have you test PHP-5.0.1 on Tru64 ?
 [2004-08-18 13:50 UTC] tony2001@php.net
Please, ask these questions on support mailing lists.
You just need to change mysql.default_socket to the real location of MySQL socket. Your problem is not concerned with compiling options and/or your OS.
 [2004-08-18 14:04 UTC] kil at systema dot ru
Real socket location is /tmp/mysql.sock
It is identical to PHP call
I tried set up all MySQL related variables. The such result.
 [2004-08-18 14:13 UTC] kil at systema dot ru
I compiled 4.3.8 and 5.0.1 on the same machine
I didn't touch anything else except PHP
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC