On 3/15/07, FamiLink Admin <[EMAIL PROTECTED]> wrote:
I am trying to connect to a database using a small script but get this
error:

failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' perl

snip

Am I doing something wrong?
snip

Try the following instead of using the environment variable.

my $host = the machine the db is on, localhost if local;
my $port = the port mysql is listening on;
my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to