Bug 60840 - New PHP packages change default MySQL socket location
New PHP packages change default MySQL socket location
Status: CLOSED DUPLICATE of bug 60515
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Copeland
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-03-07 15:20 EST by Cristian Gafton
Modified: 2007-04-18 12:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-07 16:20:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Cristian Gafton 2002-03-07 15:20:48 EST
From a bug report I got:

Today, I ran up2date to update to php 4.06. After updating, all mysql db
functions would not work. After investigation, I found it was due to the
new mysql server placing it's .sock file at /var/lib/mysql/mysql.sock
instead of /tmp/mysql.sock, where PHP expects it.

I corrected this issue by placing the following line in /etc/php.ini:
mysql.default_socket =  /var/lib/mysql/mysql.sock

I believe this is caused due to a configuration problem with the recent
build of mysql that was installed.

I have not modified the system or used any software or packages from any
other source than redhat itself.
Comment 1 Need Real NameMichael J. Fiorill 2002-03-07 16:20:53 EST
This upgrade also appears to break PEAR support. Packages depening 
on PEAR for abstracted database calls break (such as PHPnuke). See 
pear.php.net for info on PEAR.
Comment 2 Phil Copeland 2002-03-07 16:24:21 EST

*** This bug has been marked as a duplicate of 60515 ***
Comment 3 Jarryd Beck 2005-04-04 23:36:03 EDT
you could try changing my.cnf in /etc. If php changes the default it is probably
changing that file. If that file doesn't exist (you've probably set it up wrong
then, it should exist) copy your desired my.cnf file from
path-to-mysql/support-files to /etc then rename it to my.cnf (it will originally
be called my-large.cnf or my-small.cnf or a few others).
Then open it up and right near the top it should have a couple of socket
settings. Change them all back to /tmp/mysql.sock if they are different.
If they aren't different because you just copied that file from the
support-files directory then restart your mysql server and it should work.

Note You need to log in before you can comment on or make changes to this bug.