Error In Using Perl To Connect To MySQL

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Error In Using Perl To Connect To MySQL

    OS: Windows XP SP2
    Perl version : v5.8.7 built for MSWin32-x86-multi-thread
    MySQL version : server: 5.0.21-community-nt
    MySQL version : client: 5.0.11

    Both Perl and MySQL work on my machine. I wanted to test using Perl to
    manipulate MySQL data.

    I installed DBI and DBD:mysql. And when I try testing to connect to
    MySQL inside a perl script, I got the following error:

    DBI connect('database=mymusic;host=localhost','root',. ..) failed: Client
    does not support authentication protocol requested by server; consider
    upgrading MySQL client at mydbi.pl line 24

    My problems:
    1) I installed MySQL. I couldn't find separate server and client
    installations. So I am not sure how to "upgrade client".

    Appreciate for any help. Thank you.
    Louis Guest

  2. Similar Questions and Discussions

    1. ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'(10061)
      I've had 4.1 installed for over a year and for all this time have been connecting successfully from Tomcat and Java stand-alone classes.. now just...
    2. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
    3. MySql connect error
      I'm using CF MX7 (developer version) with MySQL 4.1.12 on Mac OSX Tiger. I have followed the instructions here:...
    4. Mysql_(p)connect error using PHP/Mysql
      I am trying to get Dreamweaver to use PHP(5.0.3)/MySQL (4.1) and using an apache web server. Cool, BUT when i try to make my datrabase connection i...
    5. MySQL on non standard port yields error 111 on connect
      I am trying to connect to MySQL running on a port other than 3306. Port 8123 in my case. I have tried this:...
  3. #2

    Default Re: Error In Using Perl To Connect To MySQL

    Louis <t051315@hotmail.com> writes:
    > OS: Windows XP SP2
    > Perl version : v5.8.7 built for MSWin32-x86-multi-thread
    > MySQL version : server: 5.0.21-community-nt
    > MySQL version : client: 5.0.11
    >
    > Both Perl and MySQL work on my machine. I wanted to test using Perl
    > to manipulate MySQL data.
    >
    > I installed DBI and DBD:mysql. And when I try testing to connect to
    > MySQL inside a perl script, I got the following error:
    >
    > DBI connect('database=mymusic;host=localhost','root',. ..) failed:
    > Client does not support authentication protocol requested by server;
    > consider upgrading MySQL client at mydbi.pl line 24
    No need to upgrade, just give 'root' an old-style password. Have a look:

    <http://dev.mysql.com/doc/refman/5.1/en/old-client.html>

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  4. #3

    Default Re: Error In Using Perl To Connect To MySQL

    Sherm Pendley wrote:
    > Louis <t051315@hotmail.com> writes:
    >
    >> OS: Windows XP SP2
    >> Perl version : v5.8.7 built for MSWin32-x86-multi-thread
    >> MySQL version : server: 5.0.21-community-nt
    >> MySQL version : client: 5.0.11
    >>
    >> Both Perl and MySQL work on my machine. I wanted to test using Perl
    >> to manipulate MySQL data.
    >>
    >> I installed DBI and DBD:mysql. And when I try testing to connect to
    >> MySQL inside a perl script, I got the following error:
    >>
    >> DBI connect('database=mymusic;host=localhost','root',. ..) failed:
    >> Client does not support authentication protocol requested by server;
    >> consider upgrading MySQL client at mydbi.pl line 24
    >
    > No need to upgrade, just give 'root' an old-style password. Have a look:
    >
    > <http://dev.mysql.com/doc/refman/5.1/en/old-client.html>
    >
    > sherm--
    >
    Hi Sherm,

    Thank you for your solution. It works. I am still puzzled by the
    explanation though. I have never used MySQL pre 4.1. Whatever works.

    Thank you very much.
    Louis Guest

  5. #4

    Default Re: Error In Using Perl To Connect To MySQL

    Louis <t051315@hotmail.com> writes:
    > Sherm Pendley wrote:
    >> Louis <t051315@hotmail.com> writes:
    >>
    >>> OS: Windows XP SP2
    >>> Perl version : v5.8.7 built for MSWin32-x86-multi-thread
    >>> MySQL version : server: 5.0.21-community-nt
    >>> MySQL version : client: 5.0.11
    >>>
    >>> Both Perl and MySQL work on my machine. I wanted to test using Perl
    >>> to manipulate MySQL data.
    >>>
    >>> I installed DBI and DBD:mysql. And when I try testing to connect to
    >>> MySQL inside a perl script, I got the following error:
    >>>
    >>> DBI connect('database=mymusic;host=localhost','root',. ..) failed:
    >>> Client does not support authentication protocol requested by server;
    >>> consider upgrading MySQL client at mydbi.pl line 24
    >> No need to upgrade, just give 'root' an old-style password. Have a
    >> look:
    >> <http://dev.mysql.com/doc/refman/5.1/en/old-client.html>
    >> sherm--
    >>
    > Hi Sherm,
    >
    > Thank you for your solution. It works. I am still puzzled by the
    > explanation though. I have never used MySQL pre 4.1. Whatever works.
    Are you using ActiveState Perl? If so, and if you're using DBD::mysql
    from a PPM, then that's using whatever MySQL client library version that
    ActiveState built it against. That could very well be a pre-4.1 version.

    sherm--

    --
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Hire me! My resume: [url]http://www.dot-app.org[/url]
    Sherm Pendley Guest

  6. #5

    Default Re: Error In Using Perl To Connect To MySQL

    Sherm Pendley <sherm@dot-app.org> wrote:
    > Louis <t051315@hotmail.com> writes:
    >
    >> Sherm Pendley wrote:
    >>> Louis <t051315@hotmail.com> writes:
    >>>
    >>>> OS: Windows XP SP2
    >>>> Perl version : v5.8.7 built for MSWin32-x86-multi-thread
    >>>> MySQL version : server: 5.0.21-community-nt
    >>>> MySQL version : client: 5.0.11
    >>>>
    >>>> Both Perl and MySQL work on my machine. I wanted to test using Perl
    >>>> to manipulate MySQL data.
    >>>>
    >>>> I installed DBI and DBD:mysql. And when I try testing to connect to
    >>>> MySQL inside a perl script, I got the following error:
    >>>>
    >>>> DBI connect('database=mymusic;host=localhost','root',. ..) failed:
    >>>> Client does not support authentication protocol requested by server;
    >>>> consider upgrading MySQL client at mydbi.pl line 24
    >>> No need to upgrade, just give 'root' an old-style password. Have a
    >>> look:
    >>> <http://dev.mysql.com/doc/refman/5.1/en/old-client.html>
    >>> sherm--
    >>>
    >> Hi Sherm,
    >>
    >> Thank you for your solution. It works. I am still puzzled by the
    >> explanation though. I have never used MySQL pre 4.1. Whatever works.
    >
    > Are you using ActiveState Perl? If so, and if you're using DBD::mysql
    > from a PPM, then that's using whatever MySQL client library version that
    > ActiveState built it against. That could very well be a pre-4.1 version.
    Yup, Sherm is right, it has to do with how the library talks with MySQL.
    If you are going to use MySQL with other programs, like PHP, you might
    bump into this issue more often. I am already considering to downgrade to
    the MySQL 4.x branch since there might be other issues as well (for
    example the handling of defaults IIRC).

    --
    John Bokma Freelance software developer
    &
    Experienced Perl programmer: [url]http://castleamber.com/[/url]
    John Bokma Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139