Chapter 10 Mysqlnd connection multiplexing plugin

Table of Contents

10.1 Key Features
10.2 Limitations
10.3 About the name mysqlnd_mux
10.4 Concepts
10.4.1 Architecture
10.4.2 Connection pool
10.4.3 Sharing connections
10.5 Installing/Configuring
10.5.1 Requirements
10.5.2 Installation
10.5.3 Runtime Configuration
10.6 Predefined Constants
10.7 Change History
10.7.1 PECL/mysqlnd_mux 1.0 series

Copyright 1997-2014 the PHP Documentation Group.

The mysqlnd multiplexing plugin (mysqlnd_mux) multiplexes MySQL connections established by all PHP MySQL extensions that use the MySQL native driver (mysqlnd) for PHP.

The MySQL native driver for PHP features an internal C API for plugins, such as the connection multiplexing plugin, which can extend the functionality of mysqlnd. See the mysqlnd for additional details about its benefits over the MySQL Client Library libmysqlclient.

Mysqlnd plugins like mysqlnd_mux operate, for the most part, transparently from a user perspective. The connection multiplexing plugin supports all PHP applications, and all MySQL PHP extensions. It does not change existing APIs. Therefore, it can easily be used with existing PHP applications.


This is a proof-of-concept. All features are at an early stage. Not all kinds of queries are handled by the plugin yet. Thus, it cannot be used in a drop-in fashion at the moment.

Please, do not use this version in production environments.