mysql 4.1x and DBD::mysql (and mysqlPP)

From: Burak Gürsoy (burakgursoy_at_gmx.net)
Date: 11/04/04

  • Next message: Tim Bunce: "Re: need help capturing an error"
    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


  • Next message: Tim Bunce: "Re: need help capturing an error"

    Relevant Pages

    • =?UTF-8?Q?RE=C2=A0:_Cant_connect_to_Sybase_Rep_server?=
      ... perl Makefile.PL ... Objet: Re: Can't connect to Sybase Rep server ... use DBI; ... Toute utilisation de ce ...
      (perl.dbi.users)
    • Re: DBI and DBI::Oracle packages configuration
      ... The problem is that the server doesn't have DBI and ... >perl, c, etc. ... The installation won't touch overall system ...
      (comp.lang.perl)
    • Re: DBI and DBI::Oracle packages configuration
      ... The problem is that the server doesn't have DBI and ... >perl, c, etc. ... The installation won't touch overall system ...
      (comp.lang.perl.modules)
    • RE: Can not get DBI to work on a windows XP machine
      ... What's missing from your message is what Perl you are using. ... I'll also presume that you used the PPM tool to install DBI from an ActiveState repository. ... I've installed DBD::ODBC on an XP and have successfully accessed an MSDE server. ... I have two computers one a Windows XP computer and the other a Windows ...
      (perl.dbi.users)
    • Re: upgrading dbi
      ... And Perl 5.006001 is hardly the most recent version of Perl. ... >>> I have a pretty old version of DBI on a production server. ... >>> development environment). ... >>> about upgrading? ...
      (perl.dbi.users)

  • Quantcast