Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Issues with DBD::mysql - please help

by drohr (Novice)
on Jun 20, 2014 at 19:57 UTC ( #1090685=perlquestion: print w/replies, xml ) Need Help??

drohr has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am using activestate perl 5.16.3 on win7-64. This version of perl came with DBI, but it did not come with DBD::mysql. i used the ppm to search for DBD-mysql, but but it was not listed (other versions were there; csv, odbc, etc). so i went to cpan and downloaded the module from this link:

i extracted the files and copied them in the following directories:
- -> C:\Perl64\lib\DBD - mysql\ -> C:\Perl64\lib\DBD\mysql - mysql\INSTALL.pod -> C:\Perl64\lib\DBD\mysql
here is a stripped down code snippet of how i am using DBI
use DBI; my $url = sprintf('DBI:%s:%s:%s', $driver, $database, $hostname); my $dbh = DBI->connect( $url, $username, $password, {RaiseError => 1, AutoCommit => 1} )
when i run that code, i get the following error:
install_driver(mysql) failed: Can't locate loadable object for module +DBD::mysql in @INC (@INC contains: ../ C:\Program Files (x86)\ActiveS +tate Komodo IDE 8\lib\support\dbgp\perllib c:/Perl64/site/lib c:/Perl +64/lib .) at (eval 31)[c:/Perl64/lib/] line 3. Compilation failed in require at (eval 31)[c:/Perl64/lib/] l +ine 3. Perhaps a module that DBD::mysql requires hasn't been fully installed
i know the DBD-mysql files are in the correct paths, but it sounds like this module isnt installed correctly? what am i missing here? does DBD-mysql work with 5.16.3? i know that i have used that module in earlier versions of perl.


Replies are listed 'Best First'.
Re: Issues with DBD::mysql - please help
by blue_cowdawg (Monsignor) on Jun 20, 2014 at 20:34 UTC

    Do you have a mysql client installed on your PC along with its libraries? (taking a stab in the dark here..)

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      yes i do.
            yes i do.

        I'd see if the folks over at Strawberry have any ideas then. I stopped using Strawberry Perl a long time ago due to some wonkiness I experienced.

        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Issues with DBD::mysql - please help
by fishmonger (Chaplain) on Jun 20, 2014 at 20:47 UTC

    The ppd is in the Bribes repository.

    ppm install
      yes, i tried both commands:
      C:\Users\me>ppm install
      ppm install failed: 500 Can't connect to (10061)

      C:\Users\me>ppm install DBD-mysql
      ppm install failed: Can't find any package that provides DBD-mysql

        Can you ping

        C:\>ping /n 1 Pinging [] with 32 bytes of data: Reply from bytes=32 time=146ms TTL=44 Ping statistics for Packets: Sent = 1, Received = 1, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 146ms, Maximum = 146ms, Average = 146ms

        I can also reach port 80 and load the page in browser.

        C:\>nmap -p80 Starting Nmap 6.25 ( ) at 2014-06-20 14:13 Pacific Day +light Time Nmap scan report for ( Host is up (0.034s latency). rDNS record for PORT STATE SERVICE 80/tcp open http Nmap done: 1 IP address (1 host up) scanned in 0.46 seconds

        I can also hit it with ppm.

        C:\>ppm install Installing package ''... Error installing package ' +': Read a PPD for ' DBD-mysql.ppd', but it is not intended for this build of Perl (MSWin32 +-x86-multi-thread-64int-5.18)
Re: Issues with DBD::mysql - please help
by aitap (Curate) on Jun 21, 2014 at 05:14 UTC

    i extracted the files and copied them in the following directories:
    This is not a correct way to install modules, especially if there is XS code. If all else fails (i.e. if you fail to get the binary package from places suggested by others), you'll need to install the compiler suite (ppm install MinGW) and compile the module:
    perl Makefile.PL dmake dmake install

    You can also use cpan or cpanm to automatically track and install module dependencies, if any are required. For more info, check

      hey guys, thanks for all the feedback. it turned out that my work blocks the URL for the ppm repository. i installed 5.16 at home, found the DBD::mysql module in the ppm, installed it, then copied the installed files to my work computer and it all works as expected. thanks again,
      would it be possible for someone to send me all the installed files from the DBD-mysql installation so that I can use them? I have already gone down the activestate perl 5.16 path in my development and this is the last module that I need to get working. it would be a lot of work to switch to another database driver or another version of perl.

Re: Issues with DBD::mysql - please help
by poj (Abbot) on Jun 20, 2014 at 20:38 UTC
    Did you try  ppm install DBD-mysql from the command line ?
Re: Issues with DBD::mysql - please help
by Bodger (Novice) on Jun 20, 2014 at 23:52 UTC

    At my last firm we used ActiveState for 8-10 years. But they recently started end of lifeing versions of perl more then 2 steps from current.

    And with the 64 bit perls they were getting less and less CPAN modules available, especially the ones we needed to operate with.

    We gave up and went to Strawberry Perl, if you want 64 bit you really are asking for pain by staying with ActiveState.

    Good luck on that though.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1090685]
Approved by ww
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2020-07-10 13:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found