I am confused as to why I am unable to connect to my MySQL DB 4.1.13 via 
DBI:DBD in PERL.

This is on SuSE Pro 9.1, perl-5.8.3-32, perl-DBI-1.41-28, 
perl-DBD-mysql-2.9003-22.

I am getting the following error:

DBI connect('host=localhost;database=lts','dbmgr',...) failed: Client does not 
support authentication protocol requested by server; consider upgrading MySQL 
client at ./lts_connect_test.pl line 25
Can't call method "disconnect" on an undefined value at ./lts_connect_test.pl 
line 30.


I have just created the user and granted all privileges with the following 
sequence:

> mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.1.13-Max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES ON lts.* TO 'dbmgr'@'localhost' IDENTIFIED BY 
'pwd';


Then I run the following code:
---------------------------------
#!/usr/bin/perl -w

use DBI;                
use strict;             

my $lts_username='dbmgr';
my $lts_password='pwd';
my $lts_data_source;
my $lts_dbh;

connect_lts();
disconnect_lts();
sub connect_lts  {
        my $lts_source='DBI:mysql:host=localhost;database=lts';
        $lts_dbh = DBI->connect($lts_source,$lts_username,$lts_password);
}

sub disconnect_lts  {
        $lts_dbh->disconnect();
}
---------------------------------

And get the error listed above.  I have also created a user that has only 
SELECT privilege and it works fine with this slight modification to the above 
code:

my $lts_username='wmdbread';
my $lts_password='';


I have also run FLUSH PRIVILEGES; in mysql as root and it did not change 
anything.   I have also verified that the mysql.db table shows the users with 
the proper db and privileges.

Has anyone experienced this?  Any ideas?

Thanks,
Darrell Cormier


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to