[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Perl:DBI



At 16:33 31/03/2004 +0100, Rob Andrews wrote:

On Wed, 2004-03-31 at 16:07, Steve Tickle wrote:
> I haven't yet found anywhere where I can insert the path to mysqld.sock in
> the connect string.
> Strange thing is, /etc/mysql/my.cnf has the path to mysqld.sock as
> /var/run/mysqld/mysqld.sock although it's actually /tmp/mysqld.sock.

Your connect statement should look like:

my $dbh=DBI->connect(
  "DBI:mysql:database=mydb;mysql_socket=/tmp/mysqld.sock",
  "myusername", "mypassword"
);
That's got it!
As usual, my ineptitude overcome by other people's patience and persistence ;-)

Cheers all.

--
Steve