Home > Archive > MySQL ODBC Connector > September 2005 > Connection Failure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Connection Failure
Darrell Cormier

2005-09-17, 8:23 pm

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=localh
ost;database=lts','d
bmgr',...) 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:mys
ql:host=localhost;da
tabase=lts';
$lts_dbh = DBI-> connect($lts_source,
$lts_username,$lts_p
assword);
}

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='wmdbr
ead';
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/mysql? unsub...sie.nctu.edu.tw

Michael Stassen

2005-09-17, 8:23 pm

You are trying to connect to a 4.1 server with a 4.0 client. This is
explained in the manual <http://dev.mysql.com/doc/mysql/en/old-client.html>.

Michael

Darrell Cormier wrote:
> 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=localh
ost;database=lts','d
bmgr',...) 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:
>
>
>
> 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:mys
ql:host=localhost;da
tabase=lts';
> $lts_dbh = DBI-> connect($lts_source,
$lts_username,$lts_p
assword);
> }
>
> 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='wmdbr
ead';
> 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/mysql? unsub...sie.nctu.edu.tw

Darrell Cormier

2005-09-17, 8:23 pm

On Saturday 17 September 2005 16:12, Michael Stassen wrote:
> You are trying to connect to a 4.1 server with a 4.0 client. This is
> explained in the manual
> <http://dev.mysql.com/doc/mysql/en/old-client.html>.
>
> Michael


Thanks for the information. I guess the perl-DBD and perl-DBI are old. I
will just use the OLD_PASSWORD() function for now until I have more time to
address the old DBI/DBD.

Thanks,
Darrell Cormier


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com