in reply to perl uses wrong socket to connect to mysql

Perl doesn't know this because my.conf can be in a different place, you might not have a local mysql server, you might not want to connect to the local mysql, or you might have more than one local mysql deamon.

In other words; you need to supply the connection info yourself, because it's no use guessing.

update: the DBD::mysql manual states:

    $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
    $dbh = DBI->connect($dsn, $user, $password);
  • Comment on Re: perl uses wrong socket to connect to mysql

Replies are listed 'Best First'.
Re^2: perl uses wrong socket to connect to mysql
by Anonymous Monk on Apr 16, 2005 at 21:25 UTC
    ok, so always connect to a host and port and not via the deafult perl socket

    Thanks Luca