[ABE.pm] DBI error?

Faber J. Fedor faber at linuxnj.com
Thu Sep 27 08:44:50 PDT 2007


I don't think this is actually Perl related, but I'm running out of
ideas.

I've upgraded a system from RHEL 3 to CentOS 5. In testing my code, I
attempt to connect to my shiny new MySQL 5.0 database and I get the
error

DBI connect('nycadb_qa','nycadb',...) failed: Can't connect to local
MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at
/home/sqa/libs/nycadb.pm line 154

The problem is /var/lib/mysql/mysql.sock is NOT my socket file,
/data/mysql/mysql.sock is.  

I can connect to the database just fine via the command-line client,
the setting in /etc/my.cnf is 

[mysqld]
datadir=/data/mysql
socket=/data/mysql/mysql.sock

and

[root at bkp-qa mysql]# mysqladmin --print-defaults
mysqladmin would have been started with the following arguments:
--port=3306 --socket=/data/mysql/mysql.sock --port=3306 --socket=/data/mysql/mysql.sock

Nowhere in my code do I specify the socket to connect to.

WTF?

-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the ABE-pm mailing list