Subject: | Authentication error with MySQL 4.1.7 and dbd-mysql 2.9003 |
I'm using MySQL 4.1.7 for WindowsXP Pro, all latest patch but sp2
Active Perl 5.8.3 with DBI v1.45 and DBD-MySQL v 2.9003 (both latest version according to ppm)
When trying to connect to DB with "authentified user" ie : username and password as example below, get and error.
Example:
#!/usr/local/bin/perl
use strict;
use DBI;
my $database = "my_db";
my $hostname = "localhost";
my $port = 3306;
my $user = "auth_user";
my $password = "password";
my $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
my $dbh = DBI->connect($dsn, $user, $password);
my $sth = $dbh->prepare("show tables");
$sth->execute;
#...
$sth->finish;
$dbh->disconnect();
-----------------------------------------
Output at command prompt:
DBI connect('database=mailstats_db;host=localhost;port=3306','auth_user',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at <path of my script> line <line number of the DBI->connect>
User "auth_user" as proper password and access rights.
I've used the same script with user that has no password and it worked correctly.
I've used the same script with "root" user / password and got the same error.
Can you help?