mahadeo's bits

Online blog about offline stuff

How to install DBD::mysql Perl module

The common way to install Perl modules is a CPAN manager. To run it, type

perl -MCPAN -e shell

To install DBD::mysql module, you normally need to type:

install DBD::mysql

However, after trying to run the Perl script that uses DBD::mysql module, I got a bunch of error messages like “Either your server is not up and running or you have no permissions for acessing the DSN DBI:mysql:test. This test requires a running server and write permissions. Please make sure your server is running and you have permissions, then retry.”

In short, Perl tries to perform all tests and needs access to a test DB on your mysql server. But if you trust the developers of this module, you can just skip the failed tests and install ignoring errors. Type this and you’re done:

force install DBD::mysql

Here is the source. Here is some funny related info.