1. first check if it is already installed:
at the command line, type: instmodsh
at the cmd line, type: l
It will list all the installed perl modules.
If you see both DBI and DBD::mysql, then you are all set
2. goto the cpan installation by typing : perl -MCPAN -e shell
If DBI is not installed, install it by type
install DBI
3. If DBD::mysql is not installed, install it by type
install DBD::mysql
If it complains about not able to find mysql socket, our mysql.sock is at /home/db/mysql
mkdir /var/lib/mysql
ln -s /home/db/mysql/mysql.sock /var/lib/mysql/mysql.sock