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 responses to “ActiveState Perl 5.10, Windows XP, and DBD-mysql”
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!
You need to add additional repositories to ActiveState – it is possible to do quickly in GUI interface.
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
Excellent. Thanks all for the pointers. I will try that out when I do it next time.
Good suggestions guys, thanks. I had that exact problem and Jan Dubois’ command line tips worked perfectly
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.
Hey Jan,
Thanks a lot for that. Really appreciate it!