Hi gusy,

Can any one suggest , how to install DBD::mysql on windows mechine. (Its eating my head). I tried all the possible ways , but its not installing.

1) I tried to install directly from cpan , failed
2) manually downloaded, and tried to install, still failing : showing the error like this . you have no gcc compiler in your path. So unable to install.

other DBD modules are already installed why not mysql.

Dani AI

Generated

Short summary: the original problem from was a build failure for DBD::mysql on Windows (no compiler), and rightly pointed out using a binary package manager as an easier route — which, per ’s follow-up, fixed that case. ’s later report (PPM said “installed” but no mysql.pm found) is a separate symptom and worth a focused diagnosis.

Quick checklist to narrow the cause

  • Confirm which Perl you’re actually using and whether it’s 32- or 64-bit (run perl -V to see @INC and the install root). Multiple Perl installs are a common trap: PPM can install into one Perl while your PATH uses another.
  • Search your Perl library paths for DBD files (look under your Perl root’s site/lib/DBD and site/lib/auto/DBD/mysql). The driver has both Perl-side files and a compiled binary in an auto/DBD/mysql directory; absence of either points to an incomplete install.
  • If PPM showed success but files are missing, check the PPM install log for errors and confirm the PPM package matches your exact ActivePerl version and CPU architecture.

Practical fixes

  • If you don’t want to compile: get a prebuilt PPM that exactly matches your ActivePerl version/bitness and install that. Binary packages avoid the need for a compiler or MySQL headers.
  • If you need to build from CPAN: use Strawberry Perl (bundles gcc/dmake) or install a compiler that matches the one used to build your Perl. Also install MySQL client headers/libs (or Connector/C) before building so the XS code can link.
  • For offline systems: download the PPM archive and its dependencies on a machine with internet and add them to your local PPM repository — make sure both the lib/DBD files and the auto/DBD/mysql binary files are included.

Verification and final tip

  • Confirm success by loading the module (perl -MDBD::mysql -e "print $DBD::mysql::VERSION\n"). If that fails but files exist, it’s usually a bitness/compiler mismatch or the compiled binary isn’t on your PATH/@INC. If problems persist, report the exact Perl version, bitness, and the PPM package name/version — that information makes troubleshooting much quicker.

Recommended Answers

All 3 Replies

Do you have a package manager? If you have ActivePerl from ActiveState then you probably have PPM. Just type ppm at the command prompt and PPM starts up with a GUI. I don't know if that will solve the problem, but package managers are an alternative way to install binaries while automatically notifying you of dependencies (if any).

Thanks , I done this

Same problem. I'm using SBS 2003 SP1. ActivePerl 5.10. My system does not have internet access, but I've created a local repository. PPM shows the module waiting for installation. When I run 'ppm install dbd-mysql' (v4.014) it completes without error, but there's no anywhere under DBD or DBI.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.