[email protected]
[Top] [All Lists]

RE: accessing MySQL via Perl

Subject: RE: accessing MySQL via Perl
From: "Gerald Preston"
Date: Fri, 4 Mar 2005 03:32:50 -0600

What is u.user u in   “UPDATE        u.user u”?





From: activeperl-bounces@xxxxxxxxxxxxxxxxxxxxxxxx [mailto:activeperl-bounces@xxxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Darren Barnes
Sent: Friday, March 04, 2005 2:25 AM
To: 'Gerald Preston'; 'Mulley, Nikhil'; activeperl@xxxxxxxxxxxxxxxxxxxxxxxx
Subject: RE: accessing MySQL via Perl


It states in the documentation to use DBD-mysql 2.9004 but I still had the same problem even upgrading. I believe it’s not handling the new 41-bit length passwords.


To get round it you can either start the database with old_passwords (--old_passwords) enabled, then add the users but you will lose out on the new security enhancements.


You will also change the password for a user by using the inbuilt OLD_PASSWORD function as follows:


After connecting to mySQL as the administrator

UPDATE        u.user u

SET               Password = OLD_PASSWORD(‘<PASSWORD>’)

WHERE         User = ‘<UID>’


At the moment I still have got the new passwords to work but let me know I you do?





I am inserting some data with r following code:




use warnings;

use strict;

use DBI;

#use DBD-mysql;


  my $group_name = "beer";

  my $me         = "E";

  my $daily      = "03032005";

  my $item       = "Bacardi";

  my $unit       = "2";

  my $qty        = "3";

  my $amount     = "6";

  my $tax        = "0.41";

  my $total      = "6.41";


  my $dbh=DBI->connect( 'dbi:mysql:club', 'gjwpp88', 'xxxxxxxxx' ) or die "\n$DBI::errstr\n";


  my $sql = "insert into wolfies( group_name, me, daily, item, unit, qty, amount, tax, total )

                          values( ?,          ?,  ?,     ?,    ?,    ?,   ?,      ?,   ?     ) ";

  my $sth = $dbh->prepare( $sql ) or die $dbh->errstr if $dbh->err;


 $sth->execute( $group_name, $me, $daily, $item, $unit, $qty, $amount, $tax, $total ) or warn "Cannot execute FIRST Statement!!\n$DBI::errstr";


I get “DBI connect<’club’,’gjwpp88’,….> failed; Client does not support authentication protocol requested by server”


Any ideas?









ActivePerl mailing list
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
<Prev in Thread] Current Thread [Next in Thread>