DBI module provides a generic interface
for database access. You can write a
that works with many different database engines without change. To
DBI, you must install the
DBI module, as well as a DataBase Driver (DBD)
module for each type of database server you want to access. For
MySQL, this driver is the
Perl, and the
DBD::MySQL module for
DBI must be installed if you want to run the
MySQL benchmark scripts; see Section 8.13.2, “The MySQL Benchmark Suite”.
They are also required for the MySQL Cluster
ndb_size.pl utility; see
Section 17.4.24, “ndb_size.pl — NDBCLUSTER Size Requirement Estimator”.
Perl support is not included with MySQL distributions. You can obtain the necessary modules from http://search.cpan.org for Unix, or by using the ActiveState ppm program on Windows. The following sections describe how to do this.
DBD interface requires
Perl 5.6.0, and 5.6.1 or later is preferred. DBI does not
work if you have an older version of Perl. You should use
DBD::mysql 4.009 or higher. Although earlier
versions are available, they do not support the full functionality
of MySQL 5.1.