PHP with MySQL Client Library or MySQL Native Driver
PHP provides, since version 5.3, with mysqlnd, the MySQL Native Driver, a access method to MySQL databases which allow to not use the MySQL Client Library. (libmysqlclient in mysql-libs).
Fedora >= 16, or remi repository users, will have the choice.
Until now, it wasn't possible to build mysqlnd a shared library, so impossible to provides extensions for both the driver. A the PHP bug #55609 is solved, this is now possible.
The php-mysql package provides, as usually, extensions which use the MySQL client library, provided by mysql-libs.
The new php-mysqlnd package provides extensions which use the bundled MySQL Native Driver, it comes with:
- mysqlnd, the driver
- mysqlnd_mysql, mysql extension which use mysqlnd
- mysqlnd_mysqli, mysqli extension which use mysqlnd
- pdo_mysqlnd, pdo_mysql extension which use mysqlnd
Of course, it is not possible to install both packages.
On an already installed computer, to switch to the new driver, you must use yum in expert mode:
# yum shell
> remove php-mysql
> install php-mysqlnd
The use of this new driver is transparent for PHP applications. Some report better performances (notably for memory). Furthermore, this remove dependency on mysql-libs.
Of course, RPM are also available in my repository:
- remi for fedora >= 12
- remi-test for enterprise linux >= 5
I'm expecting your feedback.