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.

Starting with fedora 16, users of mysql, mysqli or pdo_mysql will have the choice. See : php-5.3.8-2.fc16 (update announcement).

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
> run
> quit

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.