Pluggable Storage Engine Architecture The pluggable storage engine architecture provides a standard set of management and support services that are common among all underlying storage engines. The storage engines themselves are the components of the database server that actually perform actions on the underlying data that is maintained at the physical server level. This efficient and modular architecture provides huge benefits for those wishing to specifically target a particular application need—such as data warehousing, transaction processing, or high availability situations—while enjoying the advantage of utilizing a set of interfaces and services that are independent of any one storage engine. The application programmer and DBA interact with the MySQL database through Connector APIs and service layers that are above the storage engines. If application changes bring about requirements that demand the underlying storage engine change, or that one or more storage engines be added to support new needs, no significant coding or process changes are required to make things work. The MySQL server architecture shields the application from the underlying complexity of the storage engine by presenting a consistent and easy-to-use API that applies across storage engines. MySQL Server uses a pluggable storage engine architecture that enables storage engines to be loaded into and unloaded from a running MySQL server. Before a storage engine can be used, the storage engine plugin shared library must be loaded into MySQL using the  INSTALL PLUGIN  statement. For example, if the  EXAMPLE  engine plugin is named  example and the shared library is named  ha_example.so , you load it with the following statement: INSTALL PLUGIN example SONAME ’ha_example.so’; To install a pluggable storage engine, the plugin file must be located in the MySQL plugin directory, and the user issuing the  INSTALL PLUGIN  statement must have  INSERT  privilege for the  mysql.plugin table. The shared library must be located in the MySQL server plugin directory, the location of which is given by the  plugin_dir  system variable. To unplug a storage engine, use the  UNINSTALL PLUGIN  statement: UNINSTALL PLUGIN example; If you unplug a storage engine that is needed by existing tables, those tables become inaccessible, but are still present on disk (where applicable). Ensure that there are no tables using a storage engine before you unplug the storage engine. A MySQL pluggable storage engine is the component in the MySQL database server that is responsible for performing the actual data I/O operations for a database as well as enabling and enforcing certain feature sets that target a specific application need. A major benefit of using specific storage engines is that you are only delivered the features needed for a particular application, and therefore you have less system overhead in the database, with the end result being more efficient and higher database performance. This is one of the reasons that MySQL has always been known to have such high performance, matching or beating proprietary monolithic databases in industry standard benchmarks. 3433 16.11.2 The Common Database Server Layer Unplugging a Storage Engine Plugging in a Storage Engine 16.11.1 Pluggable Storage Engine Architecture