Author:David | English Version 【转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
URL:http://blog.iyi.cn/start/2007/10/php_libmysqlmysqlnd.html

mysql 发不了一个MySQL native driver for PHP – mysqlnd来替代php5/php6中自带的mysqli模块,该模块可以在这里下载到:

安装方法是用该模块替换原来的mysqli模块,或者编译php之前,将ext/mysqli目录替换掉,然后在php源代码根目录执行:buildconf –force
编译的时候加上 –with-mysqli –enable-mysqlnd即可。

官方描述的这个模块的主要优点是:

On the C-level mysqlnd uses many of the proven and stable PHP internal functions. All the code of the new driver is contained in the ext/mysqli source directory. There is no need to link any external libraries. Thus you neither need to install the MySQL client library to compile PHP with ext/mysqli support nor do you need to take care of versions. Compiling has been made easier.

mysqlnd使用了很多底层的php函数,所有最新的驱动都包含在内,编译的时候不需要再额外关联其他的库。所以编译php的时候不需要先装mysql,也不需要关心mysql版本。编译极大的简化。

并且mysqlnd的性能有很好的改善,也修复了一些原有bug,比如

  • improved persistent connections
  • mysqli_fetch_all()
  • performance statistics call: mysqli_get_cache_stats(), mysqli_get_client_stats(), mysqli_get_connection_stats()

现在php5.3.0alpha也已经发布了

Today on history:

  1. 2006:  CCTV访25岁千万富翁戴志康:写论坛起家(下)(0)
  2. 2006:  CCTV访25岁千万富翁戴志康:写论坛起家(中)(0)
  3. 2006:  CCTV访25岁千万富翁戴志康:写论坛起家(上)(0)
  4. 2006:  海上三个风暴一起来了(0)