/tmp/mysql.sock issue
Oliver Schulze L.
oliver@samera.com.py
Thu, 21 Mar 2002 22:37:22 -0300
Hi people,
I'm having this strange problem with: /tmp/mysql.sock
I have:
RH 7.2
IMP 3.0/Horde 2.0/Pear 4.1.0
PHP 4.0.6
If I configure horde to use use MySQL and host=localhost, I get this error:
A fatal error has occurred object(db_error)(7) {
["error_message_prefix"]=>
string(0) ""
["mode"]=>
int(1)
["level"]=>
int(1024)
["code"]=>
int(-24)
["message"]=>
string(24) "DB Error: connect failed"
["userinfo"]=>
string(95) " [nativecode=Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)] ** Array"
["callback"]=>
NULL
}
[/var/www/html/mail/horde/lib/Prefs/sql.php : 102]
and can connect with:
$ mysql -h localhost -D horde -u horde -p
But if I configure Horde to use my.host.com as MySQL host with the same
user/passwd,
Horde works and also this works:
$ mysql -h my.host.com -D horde -u horde -p
I don't know why PHP choose to comunicate with MySQL via this
file socket that does not exist:
/tmp/mysql.sock
and not via this file socket that does exist:
/var/lib/mysql/mysql.sock
In /etc/my.cnf I have:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
If this is a problem with the PHP build by RedHat,
I will just add and entry in bugzilla.redhat.com but the problem
is that I don't know where the problem is.
How can I be sure where the problem is? MySQL, PHP, Pear?
Many Thanks
Oliver
--
Oliver Schulze L.
oliver@samera.com.py
Asuncion-Paraguay