List:MySQL and Perl« Previous MessageNext Message »
From:Gisbert W. Selke Date:January 25 2010 1:34am
Subject:AW: Authentication protocol error connecting with perl
View as plain text  

> -----Ursprüngliche Nachricht-----
> Von: Hugh Loebner [mailto:hugh@stripped] 
> Gesendet: Freitag, 22. Januar 2010 16:00
> ---------
> use DBI;
> $dsn = "DBI:mysql:database=menx;host=mysqlsv";
> $dbh = DBI->connect($dsn, 'hugh', 'password');
> ---------
> "C:\Perl\bin\perl.exe"
> DBI   connect('database=menx;host=mysqlsv','hugh',...) 
> failed: Client does
> not support authentication
> protocol requested by server; consider upgrading  MySQL 
> client at line 3
Which version of MySQL (the server programme) are you running? (Use the MySQL cmd line
client, run the query 
select version();
Which version of DBD::MySQL are you running? (Run, from the command line,
perl -MDBD::mysql -e "print $DBD::mysql::VERSION"

Background: There was a change in the authentication protocol that the MySQL server uses
by default. That happened years back, But if you're using an old DBD::mysql, it might not
know about it yet.

For more details, cf.

> > Terminated with exit code 0.
> >
> It also fails in the same way when I try to connect using 
> user "root" which should have every privilege.
No, nothing to do with the user and his privileges. The problem arises before MySQL can
even start to check the privileges in detail.
Authentication protocol error connecting with perlHugh Loebner22 Jan
AW: Authentication protocol error connecting with perlGisbert W. Selke25 Jan
  • Re: Authentication protocol error connecting with perlHugh Loebner25 Jan