How to Install the PHP MDB2 Library and Its MySQL Driver Using PEAR

In the examples shown, replace "X.Y" with your app's PHP version (for example, "5.6" or "7.0").

MDB2 is a merge of the PEAR DC and the Metabase PHP database abstraction layers. You can read more about it at


To install the package, SSH in to your server as root and run this command:

sudo pearX.Y-sp install MDB2 MDB2_Driver_mysql

Verifying the Installation

You can then run the following command as root to verify the PEAR MDB2 library and its MySQL driver package are installed:

sudo pearX.Y-sp list | grep MDB2

You should see the following output:

MDB2              2.4.1   stable
MDB2_Driver_mysql 1.4.1   stable