Installing PERL Modules for MySQL Get MySQL and PERL talking with these PERL modules
Posted 18.10.2006 | Updated 23.05.2006 | Contributed by Andy Mallett
This article covers how to install the two main PERL Modules needed to get PERL and MySQL on speaking terms. The two modules used were DBI-1.30.tar.gz and Msql-Mysql-modules-1.2216.tar.gz (or their updated equivalents), both downloadable from the web.
Installation
Change to the directory where the above were downloaded to..
cd /usr/local/src
tar -zxvf DBI-1.30.tar.gz
cd DBI-1.30
perl Makefile.PL
make
make install
and
cd /usr/local/src
Msql-Mysql-modules-1.2216.tar.gz
tar -zxvf Msql-Mysql-modules-1.2216.tar.gz
cd Msql-Mysql-modules-1.2216
perl Makefile.PL
At this point you are prompted for the appropriate option..
Which drivers do you want to install?
1) MySQL only
2) mSQL only (either of mSQL 1 or mSQL 2)
3) MySQL and mSQL (either of mSQL 1 or mSQL 2)
4) mSQL 1 and mSQL 2
5) MySQL, mSQL 1 and mSQL 2
Enter the appropriate number: [3]
Select number 1 [enter]
Do you want to install the MysqlPerl emulation? You might keep
your old Mysql module (to be distinguished from DBD::mysql!)
if you are concerned about compatibility to existing
applications! [n]
Press [enter] for NO..
make
make install
..and that's it. With a bit of luck all went well and your PERL scripts will now be able to access data in the MySQL database.