Thank you!

I am not sure why this did it but now I get the error:

Client does not support authentication protocol requested by server. consider upgrading MySQL client.

I researched this and found the "old_password" needed to be "on" for this to work. Any idea why I need the old_password set to on to use this script? I am using redhat and everything is updated to the latest rpm's.

The script works with the old_password set to on.

Ryan

----- Original Message ----- From: "Chas Owens" <[EMAIL PROTECTED]>
To: "FamiLink Admin" <[EMAIL PROTECTED]>
Cc: "Perl Beginners List" <beginners@perl.org>
Sent: Thursday, March 15, 2007 5:35 AM
Subject: Re: using perl ot connect to a database


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/





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


Reply via email to