Add to Favourites Add to Favourites    Print this Article Print this Article

Installing DBD::mysql from source

To install DBI and DBD:mysql from source, run the following:


wget http://www.cpan.org/modules/by-module/DBD/DBI-1.634.tar.gz
tar xvzf DBI-1.634.tar.gz
cd DBI-1.634
unset LANG;
perl Makefile.PL
make
make install

cd ..
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.033.tar.gz
tar xvzf DBD-mysql-4.033.tar.gz
cd DBD-mysql-4.033
unset LANG;
perl Makefile.PL
make
make install

to install it from cpan, use this:

perl -MCPAN -e 'install Bundle::DBD::mysql'

If you get testing errors (root denied) with the cpan install, try:

cd /root/.cpan/build/DBD-mysql-4.033
perl Makefile.PL --testuser=da_admin --testpassword=`grep ^passwd= /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
make && make install

where you might need to adjust 4.033 to the version being installed.

Was this answer helpful?

Also Read