Ulf Wendel

MySQL native driver for PHP: mysqlnd-5.0.0-alpha

Dear Developers,

we are proud to announce the first alpha version of the MySQL native driver for PHP: mysqlnd 5.0.0-alpha. The software is available for download on http://dev.mysql.com/downloads/connector/php-mysqlnd.

The MySQL native driver for PHP is an additional, alternative way to connect from PHP 6 to the MySQL Server 4.1 or newer. It is a replacement for libmysql, the MySQL Client Library. From now on you can use ext/mysqli either together with libmysql as you did in the past or with mysqlnd. The MySQL native driver for PHP requires PHP 6 and can connect to MySQL Servers 4.1 or newer.

We have no plans to remove libmysql support from ext/mysqli, which would break existing applications. We just add a superior alternative to our PHP offerings:

  • The new development is licensed under the terms of the PHP license to solve any license issues.
  • On the C-level, mysqlnd uses many of the proven and stable PHP internal functions.
  • All the code is contained in the ext/mysqli source directory. There is no longer a need to link any external libraries. Thus you neither
    need to install the MySQL client library to compile PHP with MySQL support nor do you need to take care of versions.
  • Compiling has been made easier.
  • The performance of some functions has been improved. We have measured considerable performance improvements, for example when
    fetching buffered result sets.

Features and Limitations

This first alpha release is not feature complete. From the API additions discussed in November 2006, we managed to implement a first version of:

  • persistent connections
  • mysqli_fetch_all()
  • a first performance statistics call: mysqli_get_cache_stats()

Others will follow.

Unfortunately this alpha does not include Prepared Statement support. Support for Prepared Statements is our next development goal.

Closed and open development

With this alpha release we have laid the foundation for future work. We had to implement very technical and, from a user perspective, boring things like the MySQL communication protocol. We did this in a rather “closed” way. But now that the first functions are visible we have more interesting things to share than network protocol functions.

Please contribute to the development on the mailing list php@lists.mysql.com and share your ideas. See http://lists.mysql.com for details how to subscribe to the list.

As soon as the driver is feature complete and stable, we will merge it into the PHP CVS on http://cvs.php.net.

Getting the software and Installation

Please check the download page on http://dev.mysql.com/downloads/connector/php-mysqlnd for instructions.

2 Comments

  1. Congrats Ulf, Andrey and Georg. This really is great news!

  2. Why is mysqlInd for PHP 6 only?

    P.S. To get into cvs.php.net you need to get approval from PHP developers first and without PHP5 support you are going to have TOUGH time doing that.