Perl programmer for hire: download my resume (PDF).
John Bokma Perl
freelance Perl programmer

Installing DBD-mysql with ActiveState Perl

Short how to | 5 comments

If you want to use MySQL with Perl, you need to install the DBD::MySQL driver module. However, at the time of writing, this module was not available when I tried to install it via the ppm tool using ActiveState Perl. A broader search just reported:

ppm> search DBD-MySQL
Searching in Active Repositories
  1. DBD-mysql-SimpleMySQL [0.5] (none)

If I can't find a module in one of the ActiveState repositories, the next place I look is at the Theoretical Physics of the University of Winnipeg website. If the module is available, it can be installed with just a one-liner. For ActivePerl version 8xx:

C:\>ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd
====================
Install 'DBD-mysql' version 3.0002 in ActivePerl 5.8.7.815.
====================
Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.bs
Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.dll
Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.exp
Installing C:\Perl\site\lib\auto\DBD\mysql\mysql.lib
Installing C:\Perl\html\site\lib\Mysql.html
Installing C:\Perl\html\site\lib\Bundle\DBD\mysql.html
Installing C:\Perl\html\site\lib\DBD\mysql.html
Installing C:\Perl\html\site\lib\DBD\mysql\INSTALL.html
Files found in blib\arch: installing files in blib\lib into arch
itecture dependent library tree
Installing C:\Perl\site\lib\Mysql.pm
Installing C:\Perl\site\lib\Bundle\DBD\mysql.pm
Installing C:\Perl\site\lib\DBD\mysql.pm
Installing C:\Perl\site\lib\DBD\mysql\GetInfo.pm
Installing C:\Perl\site\lib\DBD\mysql\INSTALL.pod
Installing C:\Perl\site\lib\Mysql\Statement.pm
Successfully installed DBD-mysql version 3.0002 in ActivePerl 5.8
.7.815.

Note that I already had installed the DBI module, which is available via the ActiveState repository.

PPM packages for ActivePerl related

Please post a comment | read 5 comments, latest by Jayesh | RSS feed