in reply to Installing DBD::mysql for non-system Perl (CentOS)

Can share my own experience working with perlbrew on CentOS 6.6

CentOS yum repository has precompiled modules, so you can't install anything for anything, like in FreeBSD for example. Only specific DBD::mysql for system perl and system mysql.

I couldn't make cpan utility to install modules for perlbrew installations. The only working way I found is using perl -MCPAN -e shell.

From there you may compile and install DBD::mysql, but you need to have mysql-libs installed.

Here is kinda working script (don't use on production server, only safe test environment):

# if you've want to use mysql5.5 you need to updgrade mysql and mysqll +ibs: yum install mysql.`uname -i` yum-plugin-replace --assumeyes yum replace mysql-libs --replace-with mysql55-libs --assumeyes # switch to specific perl perlbrew use perl-5.18.4 # start interactive CPAN shell perl -MCPAN -e shell # type in console: install DBD::mysql
Should work fine