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

Re: [Sheflug] Perl:DBI



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"
);

-- 
rob 'nine' andrews                 <e> rob [at] impure.org.uk <pgp> 8bb5c71e
"we're not here because we're free, we're here because we're not free."

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.