Error In Using Perl To Connect To MySQL
Error In Using Perl To Connect To MySQL
am 27.05.2006 08:59:13 von Louis
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.
Re: Error In Using Perl To Connect To MySQL
am 27.05.2006 10:08:15 von Sherm Pendley
Louis 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:
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Re: Error In Using Perl To Connect To MySQL
am 28.05.2006 01:31:31 von Louis
Sherm Pendley wrote:
> Louis 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:
>
>
>
> 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.
Re: Error In Using Perl To Connect To MySQL
am 28.05.2006 01:57:18 von Sherm Pendley
Louis writes:
> Sherm Pendley wrote:
>> Louis 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:
>>
>> 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: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Re: Error In Using Perl To Connect To MySQL
am 28.05.2006 02:22:28 von John Bokma
Sherm Pendley wrote:
> Louis writes:
>
>> Sherm Pendley wrote:
>>> Louis 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:
>>>
>>> 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: http://castleamber.com/