Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 31.1Mb
PDF (A4) - 31.1Mb
PDF (RPM) - 30.4Mb
EPUB - 7.8Mb
HTML Download (TGZ) - 7.6Mb
HTML Download (Zip) - 7.6Mb
HTML Download (RPM) - 6.5Mb
Eclipse Doc Plugin (TGZ) - 8.3Mb
Eclipse Doc Plugin (Zip) - 10.1Mb
Man Pages (TGZ) - 182.5Kb
Man Pages (Zip) - 293.9Kb
Info (Gzip) - 2.9Mb
Info (Zip) - 2.9Mb
Excerpts from this Manual

MySQL 5.6 Reference Manual  /  ...  /  Installing ActiveState Perl on Windows

2.13.2 Installing ActiveState Perl on Windows

On Windows, you should do the following to install the MySQL DBD module with ActiveState Perl:

  1. Get ActiveState Perl from http://www.activestate.com/Products/ActivePerl/ and install it.

  2. Open a console window.

  3. If necessary, set the HTTP_proxy variable. For example, you might try a setting like this:

    C:\> set HTTP_proxy=my.proxy.com:3128
    
  4. Start the PPM program:

    C:\> C:\perl\bin\ppm.pl
    
  5. If you have not previously done so, install DBI:

    ppm> install DBI
    
  6. If this succeeds, run the following command:

    ppm> install DBD-mysql
    

This procedure should work with ActiveState Perl 5.6 or higher.

If you cannot get the procedure to work, you should install the ODBC driver instead and connect to the MySQL server through ODBC:

use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn",$user,$password) ||
  die "Got error $DBI::errstr when connecting to $dsn\n";

User Comments
  Posted by on March 18, 2006
Using ActivePerl 5.8.4.816 and WinXP.

...\perl\bin\ppm.bat
ppm> install DBI
ppm> install DBD-MySQL

Also worked like a charm.
  Posted by Janet Eivers on November 8, 2007
Here's my take, hope it's useful to somebody - I'm really new to developing but wanted to try out perl with MySQl. I already had a WAMP package installed so found my way to this page via google (after trying the page that lists DBI and DBD-MySQL, all of which i found really confusing:)
On this page I followed this link http://www.activestate.com/Products/ActivePerl/ and downloaded the free standard version. Needless to say it was a zipped file which i unzipped to a new folder I created on my C: drive.
In that folder was a file called Installer.bat. I double clicked the file and the package installed via the command prompt window (got asked a series of questions:), nevertheless it installed - phew!!
I then followed Nish's instructions to check the version and change directories and execute the command:
c:\perl\bin>ppm
a lovely GUI opened! and I was able to see what packages were installed and what were not. DBI was already installed (no work for me there) DBD-MySQl was not so I simply highlighted the package I wanted to install and the ppm downloaded the file for me. All that was left to do was to use the icon in the ppm (marked 'run') and - hey presto - DBD MySQL was installed for me - genius - :)

Now I can start figuring where is the best place to learn how to write perl code to work with MySQL and trying it out on my machine.
This worked on windows xp with sp2
  Posted by Mattias Malmgren on June 18, 2008
For ActivePerl 5.10.0 Build 1002 use:

ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-mysql.ppd
  Posted by José Raúl Arana Holguín on December 17, 2008
On PPM GUI over activeperl 5.10 you have to follow this steps to obtain DBD-mysql
1. On the PPM GUI press Ctrl+P
2. There is a tab named suggested, you have to select uwinnipeg and press add and then ok.
3. It will add more packages to your activeperl.
4. Now you can find DBD-mysql on the search bar in the main window of the PPM.
  Posted by Chris Calender on October 3, 2011
If the above doesn't work, as did not for me with ActivePerl 5.12.4, then try these 2 commands:

ppm rep add http://theoryx5.uwinnipeg.ca/ppms/
ppm install dbd-mysql

For reference, you can read the full tutorial/walk-through here:

http://www.chriscalender.com/?p=251
Sign Up Login You must be logged in to post a comment.