[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
MySQL Perl support requires that you've installed MySQL client programming support (libraries and header files). Most installation methods install the necesssary files. However, if you installed MySQL from RPM files on Linux, be sure that you've installed the developer RPM. The client programs are in the client RPM, but client programming support is in the developer RPM.
If you want to install Perl support, the files you will need can be obtained from the CPAN (Comprehensive Perl Archive Network) at http://search.cpan.org.
The easiest way to install Perl modules on Unix is to use the CPAN
module. For example:
shell> perl -MCPAN -e shell cpan> install DBI cpan> install DBD::mysql |
The DBD::mysql
installation runs a number of tests.
These tests require being able to connect to the local MySQL server
as the anonymous user with no password. If you have removed anonymous
accounts or assigned them passwords, the tests fail. You can use force
install DBD::mysql
to ignore the failed tests.
DBI
requires the Data::Dumper
module. It may already be
installed; if not, you should install it before installing DBI
.
It is also possible to download the module distributions in the form of
compressed tar
archives and build the modules manually. For example,
to unpack and build a DBI distribution, use a procedure such as this:
shell> gunzip < DBI-VERSION.tar.gz | tar xvf - |
shell> cd DBI-VERSION |
shell> perl Makefile.PL shell> make shell> make test shell> make install |
The make test
command is important because it verifies that the
module is working. Note that when you run that command during the
DBD::mysql
installation to exercise the interface code, the
MySQL server must be running or the test will fail.
It is a good idea to rebuild and reinstall the DBD::mysql
distribution whenever you install a new release of MySQL,
particularly if you notice symptoms such as that all your DBI
scripts
fail after you upgrade MySQL.
If you don't have access rights to install Perl modules in the system directory or if you want to install local Perl modules, the following reference may be useful:
http://servers.digitaldaze.com/extensions/perl/modules.html#modules |
Look under the heading
Installing New Modules that Require Locally Installed Modules
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |