we migrated to mysql 4.1.1. Now, when my perl-script tries to connect to the mysql-server, the following error occurs:
--
Error message:
DBI connect('database=mydatabase;mysql_client_found_rows=0;host=myhost.net','myuser',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at /mypath/skripts/cgi-bin/test.pl line 8
---
I think, the problem has to do with mod_perl, because when I run the script on the console, everything works fine. If I run the script without mod_perl (over the web with apache), the script also works without any problems. The script also works with mod_perl connecting to a mysql 4.0.x - version. Only connecting a 4.1.1-version of mysql produces the error above.
It is not a problem in general; I've got two webserver with the same script running mod_perl. On one, there is no problem, on the other the problem drives me mad.
My configuration: ----------------- System with problem: FreeBSD 5.1-RELEASE #3 Apache/2.0.49 mod_perl/1.99_13 Perl/v5.8.0 mysql-4.1.1 Client DBD::mysql 2.9003
System without problem: FreeBSD 5.2-RELEASE #0 Apache/2.0.48 mod_perl/1.99_13 Perl/v5.8.2 mysql-4.1.1 Client DBD::mysql 2.9003
The system with the problem was updated to get rid of the problem from: Apache/2.0.46
The test-script: ----------------
#!/usr/bin/perl use strict; use CGI;
# Connect to the database
use Apache::DBI;
my $dbh = DBI->connect("dbi:mysql:database=mydatabase;mysql_client_found_rows=0;host=myhost.net","myuser", "mypass", {RaiseError => 1});
my ($info) = $dbh->selectrow_array("SELECT info FROM mytable WHERE id=2");
print $cgi->header(-expires=>'-1d'); print $info;
(The name, host, password and username are not the real values)
Hope someone of you has an idea. Thanks for all answers.
Erik
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html