正在加载……
php libmysql的替代模块:mysqlnd
| |
Posted in LAMP on August 7, 2008 / 引用(0)
Author:David | English Version 【转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
URL:

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也已经发布了

This entry comes from 本站原创 and has been read for 289 times.It is tagged with , , .
发表评论

昵称

网址

电邮

OpenID登入 高级选项 表情