mysql 4.1x and DBD::mysql (and mysqlPP)
From: Burak Gürsoy (burakgursoy_at_gmx.net)
Date: 11/04/04
- Previous message: Odhiambo Washington: "Re: need help capturing an error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "perl-DBI" <dbi-users@perl.org> Date: Thu, 4 Nov 2004 14:36:57 +0200
I saw a discussion about that on the list, but I've recently upgraded to
4.1.7-nt for testing and now I can't connect to the server from perl. I
remember someone suggested re-compiling DBD::mysql from source against new
libraries, but DBD::mysqlPP also can not connect to the server (also I'm not
very familiar with linking/compiling process). So, are there any other
suggestions?
[Perl: Active Perl 5.8.4 build 810;
OS: Windows XP Professional/SP2
DBD::mysql installed via ppm]
Test code:
#!/usr/bin/perl -w
use strict;
use DBI;
my $driver = "mysql";
my $database = "burak";
my $user = "root";
my $pass = "";
print "DBI is $DBI::VERSION\n\n";
test();
$driver = "mysqlPP";
test();
sub test {
my $drv = "DBD::$driver";
print "[Testing $drv]\n";
eval {
my $DSN = sprintf "DBI:%s:database=%s", $driver, $database;
my $dbh = DBI->connect($DSN,$user,$pass,{RaiseError => 1,AutoCommit =>
1});
$dbh->disconnect;
};
print $@ if $@;
printf "$drv version: %s\n\n", $drv->VERSION;
}
__END__
Output:
DBI is 1.45
[Testing DBD::mysql]
DBI connect('database=burak','root',...) failed: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
at C:\Documents and Settings\Burak\Desktop\test.pl line 20
DBD::mysql version: 2.9004
[Testing DBD::mysqlPP]
DBI connect('database=burak','root',...) failed: Couldn't connect to
/tmp/mysql.sock: at C:/Perl/site/lib/DBD/mysqlPP.pm line 109
at C:\Documents and Settings\Burak\Desktop\test.pl line 20
(in cleanup) Can't call method "close" on an undefined value at
C:/Perl/site/lib/DBD/mysqlPP.pm line 314.
DBD::mysqlPP version: 0.04
- Previous message: Odhiambo Washington: "Re: need help capturing an error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|