Choosing a library

The mysqli, PDO_MySQL and mysql PHP extensions are lightweight wrappers on
top of a C client library. The extensions can either use the
mysqlnd library or the libmysqlclient
library. Choosing a library is a compile time decision.

The mysqlnd library is part of the PHP distribution since 5.3.0. It offers
features like lazy connections and query caching, features that are not available
with libmysqlclient, so using the built-in mysqlnd library is highly recommended.
See the mysqlnd documentation for
additional details, and a listing of features and functionality that it offers.