ActiveState Perl 5.10, Windows XP, and DBD-mysql

A few months ago I installed ActivePerl 5.10 on a Windows XP Pro workstation. Next I tried to install DBD::mysql using CPAN, it failed. When I browsed modules via ppm, a GUI in this version of ActiveState Perl on Windows, DBD::mysql was not listed as an available module.

I then downloaded the source code, manually modified the MAKE file, fiddled with Visual Studio NMAKE, compiled it a few times, without success.

Google revealed the existence of Strawberry Perl. So I removed ActiveState Perl, installed Strawberry, ran ppm install DBI, ppm install DBD-mysql. And it worked.

Fast-forward a few weeks, I started playing with EPIC, a plugin for Eclipse that supposedly provides a nice IDE for Perl development and debugging. As a result, I started fiddling with PadWalker, a prerequisites for EPIC. I couldn’t remember all the details now due to frustration, but suffice it to say that I wrestled with EPIC, Eclipse, and Strawberry so much that I thought maybe I should gave ActiveState another look. Plus, I always wanted to verify for myself what the deal is with ActiveState Perl and DBD-mysql.

So I un-installed Strawberry Perl 5.10, reinstalled ActiveState Perl 5.10. And just like last time, DBD-mysql wouldn’t install. After un-installing ActiveState, reinstalling Strawberry, running ppm install DBD-mysql, I am back in business.

So, if you want to do Perl scripting with MySQL on Windows using DBD-mysql, pick Strawberry Perl, not ActiveState.

7 Comments »

  1. Yannick Gagne Said,

    May 14, 2009 @

    I also use ActivePerl, I agree that DBD::mysql should be available easily after install.

    You need to add repositories to be able to install DBD::mysql with PPM.

    The following repo has DBD::mysql 4.005.
    http://cpan.uwinnipeg.ca/PPMPackages/10xx/

    For more info : http://cpan.uwinnipeg.ca/PPMPackages/10xx/

    Hope this helps!

  2. Alexandr Ciornii Said,

    May 14, 2009 @

    You need to add additional repositories to ActiveState – it is possible to do quickly in GUI interface.

  3. Jan Dubois Said,

    May 14, 2009 @

    It is also easy from the commandline:

    ppm repo add uwinnipeg
    ppm install DBD-mysql

    For a list of available packages you can run

    ppm repo suggest

  4. Haidong Ji Said,

    May 15, 2009 @

    Excellent. Thanks all for the pointers. I will try that out when I do it next time.

  5. Ariel Said,

    May 26, 2009 @

    Good suggestions guys, thanks. I had that exact problem and Jan Dubois’ command line tips worked perfectly

  6. Jan Dubois Said,

    May 27, 2009 @

    The ActiveState repositories for Windows have now been updated with DBD-mysql 4.011 for Perl 5.8, 5.10, and 5.10 64-bit.

  7. Haidong Ji Said,

    May 27, 2009 @

    Hey Jan,

    Thanks a lot for that. Really appreciate it!

RSS feed for comments on this post · TrackBack URI

Leave a Comment