Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Problems interacting with MySQL on Windows

by Deib (Sexton)
on Jan 06, 2005 at 21:44 UTC ( #420105=perlquestion: print w/ replies, xml ) Need Help??
Deib has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I wish you all a really awesome 2005.
My regards to everyone that replied to my last node, you guys are on my thanks list :)

I'm having problems connecting to MySQL through Perl for some data management of a small program I'm building. I'm a begginer at this, so I've been reading all the tutorials on databases in the tutorials section. Since I'm all newbie there are a lot of things I don't understand, but I have managed this far somehow. But now I'm dealing with two things I don't know much about, Perl and MySQL...and I'm stuck. Right now I'm trying to figure out how to connect to the MySQL server. For this, I was trying to use the example in stephen's Reading from a database tutorial. However, I keep getting an error I don't quite understand.
So, here's the deal: I'm running on Windows 2000 Pro, MySQL Server 4.1 with MySQL administrator 1.0 and ActivePerl 5.8.

My code goes like this for the connection part:
use strict; use DBI; my $dbh = DBI->connect('DBI:mysql:ligas','perlclient','todito') or die "Couldn't open database: $DBI::errstr; stopped";

Well, the database is ligas, and the user 'perlclient' with password 'todito' were created in Administrator, with the proper priviledges over database ligas, which has its respective tables.
The error I get from that is this:
DBI connect('ligas','perlclient',...) failed: Client does not support +authentication protocol requested by server; consider upgrading MySQL + client at line8 Couldn't open database: Client foes not support authentication protoco +l requested by server; consider upgrading MySQL client; stopped at pr line 8.

So, I'm really lost here, any pointers I can get about the nature of this error or how to fix it would be great. Thanks!!

Comment on Problems interacting with MySQL on Windows
Select or Download Code
Re: Problems interacting with MySQL on Windows
by jZed (Prior) on Jan 06, 2005 at 21:48 UTC
    Perhaps this will help.
      It does. Thanks jZed :)
Re: Problems interacting with MySQL on Windows
by Deib (Sexton) on Jan 06, 2005 at 22:05 UTC
    Ok then, I understand that the problem is that password algorithm being changed in 4.1.
    So, in short, the link that jZed sent me specifies that the client I'm using is a bit old. When it talks about the client does it mean the DBD::MySQL????
    If so, anyone knows if it is possible to get it to work with MySQL 4.1, like updating or something like that, or do I need to do that password thingy whenever I want to create a new account?
      When it talks about the client does it mean the DBD::MySQL????

      No, it means the client library that DBD::mysql is using.

      If you could recompile your client with the new libraries all would be good. I have done that, but unfortunately only on Linux.

      For Windows, you may ask PodMaster (a.k.a. crazyinsomniac), who has a repository and he takes requests.


      I've had the same trouble before. The only way i've gotten around it so far is to tell MySQL I want to use the old password algorithm on those accounts.

      Eric Hodges

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://420105]
Approved by Courage
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-09-18 17:27 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (120 votes), past polls