MySQL :: MySQL native driver for PHP

2012 年 11 月 3 日6190

MySQL Community Server

MySQL Cluster

MySQL Workbench (GUI Tool)

MySQL Proxy

MySQL Connectors

Connector/ODBC

Connector/Net

Connector/J

Connector/Python

Connector/C++

Connector/C

MySQL Native Driver for PHP

MySQL Installer (Windows)

Get MySQL Certified

MySQL Newsletter - Subscribe Today!

MySQL native driver for PHP - 双》nd

The MySQL native driver for PHP (双》nd) is a drop-in replacement for the MySQL Client Library (lib双》) for the PHP script language.

PHP MySQL extensions

The PHP MySQL extensions are lightweight wrappers on top of a C client library. There are 3 PHP MySQL extensions:

Extension Feature Comparison»

It is recommended to use either the 双》i or PDO_MySQL extensions. It is not recommended to use the old 双》 extension for new development.

Choosing a Library

The extensions can either use the 双》nd or lib双》 library to connect from PHP to MySQL. Choosing one or the other library is a compile time decision. Both libraries are supported and constantly being improved.

Library Feature Comparison»

MySQL recommends using the MySQL native driver for PHP (双》nd) together with ext/双》i or PDO_MySQL.

Download Source Code & Binaries

All 3 PHP MySQL extensions and the 双》nd library are part of the source code of PHP. The source code and binaries are available from: http://http://www.zjjv.com///downloads.php

PHP 5.4 has 双》nd as default

As of PHP 5.4, the 双》nd library is a php.net compile time default to all PHP MySQL extensions. Also, the php.net Windows team is using 双》nd for the official PHP Windows distribution since 双》nd became available in PHP 5.3.

Advantages of using 双》nd

The 双》nd library is highly optimized for and tightly integrated into PHP. The MySQL Client Library cannot offer the same optimizations because it is a general-purpose client library.

The 双》nd library is using PHP internal C infrastructure for seamless integration into PHP. In addition, it is using PHP memory management, PHP Streams (I/O abstraction) and PHP string handling routines. The use of PHP memory management by 双》nd allows, for example, memory savings by using read-only variables (copy on write) and makes 双》nd apply to PHP memory limits. Additional advantages include:

Mysqlnd Plugins

A wide range of 双》nd plugins, providing additional features are available from PECL. Popular 双》nd plugins include:

Additional Resources

0 0