PDA

View Full Version : Perl MySQL problem (mercury)


Tubba
11-21-02, 04:16 PM
Consider the following code, which used to work:

use DBI;

DBI->connect('DBI:mysql:dbname', 'user', 'pass');

but, alas, now does not. It dies with the following message:

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Any ideas what's going on, and what I would need to do to fix it?

Tubba
11-21-02, 05:13 PM
It works if I append the :mercury.powweb.com domain. Has something changed in the past few days to make such a change necessary?

HalfaBee
11-21-02, 05:57 PM
I had the same problem a few months ago on orion.

It took a lot of posts to make the admins realise there was a problem accessing mysql thru localhost.
When the number of bad connects became too high they fixed the problem.

Now I always use the server address -- this never seems to fail.

HalfaBee