The Perl Interface to MySQL

Applications written in Perl use a two-level interface to communicate with MySQL and other databases.

The DBI (database interface) is a generic programming interface. It is not MySQL-specific, and Perl and DBI can be used to interface with a wide range of databases.

There is a second database-specific level called DBD (database driver). For MySQL and mSQL, support is provided by a software package called Msql-MySQL-modules.

A simple example illustrates how DBI and DBD work. Suppose that a user is browsing a Web site, perhaps an online store that uses a database to hold its catalog. He clicks on a link to view a page of items in the catalog for which the Web server must go to the database, find out what's there, and ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.