O'Reilly logo

Sams Teach Yourself MySQL by Chris Newman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Perl DBI

MySQL connectivity from Perl is handled in the same way that you can communicate with many other types of database: using the Perl Database Interface, or DBI.

If you have already used DBI with another database, you already know the essentials and will find it very easy to interface with MySQL.

DBI is independent of the database back ends and uses a specific database driver module, known as DBD, to interface with each DBMS.

If you do not already have DBI installed, use cpan to download and install it, as follows. You should either run this command as the root user on your system or have your system administrator run it for you.

# cpan
cpan> install DBI

The installation process produces a lot of output as it downloads and installs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required