Thread

Posted on Thu May 4 17:22:47 2006 by muratet
Errant DBI
Greetings I am having a problem with mysql 5.0.21 on a new Dell quad dual-core Xeon box running RedHat Enterprise v4 which I have traced to DBI. I removed all the mysql/dbi/dbd rpms and installed the latest mysql from source and DBI and DBD from cpan. DBI passes all the tests. DBD fails with: t/10dsnlist..........DBI connect('test','',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at t/10dsnlist.t line 45 etc etc I see the same problem with my perl scripts that use DBD/DBI. Line 45 above is a call to DBI-connect which leads me to believe that's where the problem lies. It's a puzzler because mysql_config returns the correct /tmp/mysql.sock and /etc/my.cnf also points to /tmp/mysql.sock. I recall from the documentation that neither DBI nor DBD check the client config files. It behaves as though there is still a ghost of the DBI library somewhere. Can anyone point me to a *.so or *.pm or *.conf file to search for to delete so that the latest (correct) install has precedence? Thanks Mike
Direct Responses: 2236 | Write a response
Posted on Fri May 5 17:28:22 2006 by muratet in response to 2231
Re: Errant DBI
I printed @INC to find all the paths where DBI could live and deleted them until my perl scripts failed for the missing module. I then reinstalled DBI from CPAN. Much to my chagrin, the new DBI install is looking for mysql at /var/lib/mysql/mysql.sock rather than /tmp/mysql.sock which is where the mysql install puts it and mysql_config and /etc/my.cnf says it resides. Can anyone please tell me where DBI is gets its information so I can get this fixed? Thanks Mike
Write a response