Description\n-----------\n\nMariaDB supports the use of plugins, software components that may be added to the core software without having to rebuild the MariaDB server from source code. Plugins can be loaded at startup, or loaded and unloaded while the server is running, without interruption. Plugins are commonly used for adding desired storage engines, additional security requirements, logging special information about the server, or even small enhancements, such as a plugin to get a timestamp as an integer.\n\nQuerying Plugin Information\n\nThere are a number of ways to see which plugins are currently active.\n\nA server almost always has a large number of active plugins, because the server contains a large number of built-in plugins, which are active by default and cannot be uninstalled.\n\nQuerying Plugin Information with SHOW PLUGINS\n\nThe SHOW PLUGINS statement can be used to query information about all active plugins.\n\nFor example:\n\n``sql\nSHOW PLUGINS\\G;\n******************* 1. row ****************\n   Name: binlog\n Status: ACTIVE\n   Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n**************** 2. row ****************\n   Name: mysql_native_password\n Status: ACTIVE\n   Type: AUTHENTICATION\nLibrary: NULL\nLicense: GPL\n**************** 3. row ******************\n   Name: mysql_old_password\n Status: ACTIVE\n   Type: AUTHENTICATION\nLibrary: NULL\nLicense: GPL\n...\n`\n\nIf a plugin's Library column has a NULL value, then the plugin is built-in, and it cannot be uninstalled.\n\nQuerying Plugin Information with information_schema.PLUGINS\n\nThe information_schema.PLUGINS table can be queried to get more detailed information about plugins.\n\nFor example:\n\n`sql\nSELECT  FROM information_schema.PLUGINS\\G\n...\n************************ 65. row *********************\n           PLUGIN_NAME: user_variables\n        PLUGIN_VERSION: 1.0\n         PLUGIN_STATUS: ACTIVE\n           PLUGIN_TYPE: INFORMATION SCHEMA\n   PLUGIN_TYPE_VERSION: 110600.0\n        PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n         PLUGIN_AUTHOR: Sergey Vojtovich\n    PLUGIN_DESCRIPTION: User-defined variables\n        PLUGIN_LICENSE: GPL\n           LOAD_OPTION: ON\n       PLUGIN_MATURITY: Stable\n   PLUGIN_AUTH_VERSION: 1.0\n********************* 66. row *********************\n           PLUGIN_NAME: wsrep_provider\n        PLUGIN_VERSION: 1.0\n         PLUGIN_STATUS: ACTIVE\n           PLUGIN_TYPE: REPLICATION\n   PLUGIN_TYPE_VERSION: 2.0\n        PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n         PLUGIN_AUTHOR: Codership Oy\n    PLUGIN_DESCRIPTION: Wsrep provider plugin\n        PLUGIN_LICENSE: GPL\n           LOAD_OPTION: ON\n       PLUGIN_MATURITY: Alpha\n   PLUGIN_AUTH_VERSION: 1.0\n********************* 67. row ***********************\n           PLUGIN_NAME: THREAD_POOL_GROUPS\n        PLUGIN_VERSION: 1.0\n         PLUGIN_STATUS: ACTIVE\n           PLUGIN_TYPE: INFORMATION SCHEMA\n   PLUGIN_TYPE_VERSION: 110600.0\n        PLUGIN_LIBRARY: NULL\nPLUGIN_LIBRARY_VERSION: NULL\n         PLUGIN_AUTHOR: Vladislav Vaintroub\n    PLUGIN_DESCRIPTION: Provides information about threadpool groups.\n        PLUGIN_LICENSE: GPL\n           LOAD_OPTION: ON\n       PLUGIN_MATURITY: Stable\n   PLUGIN_AUTH_VERSION: 1.0\n...\n`\n\nIf a plugin's PLUGIN_LIBRARY column has the NULL value, the plugin is built-in and cannot be uninstalled.\n\nQuerying Plugin Information with mysql.plugin\n\nThe mysql.plugin table can be queried to get information about installed plugins.\n\nThis table only contains information about plugins that have been installed via the following methods:\n\n The INSTALL SONAME statement.\n The INSTALL PLUGIN statement.\n The mariadb-plugin utility.\n\nThis table does not contain information about:\n\n Built-in plugins.\n Plugins loaded with the --plugin-load-add option.\n Plugins loaded with the --plugin-load option.\n\nThis table only contains enough information to reload the plugin when the server is restarted, which means it only contains the plugin name and the plugin library.\n\nFor example:\n\n`sql\nSELECT  FROM mysql.plugin;\n\n+------+------------+\n| name | dl         |\n+------+------------+\n| PBXT | libpbxt.so |\n+------+------------+\n`\n\nInstalling a Plugin\n\nThere are three primary ways to install a plugin:\n\n A plugin can be installed dynamically with an SQL statement.\n A plugin can be installed with a mariadbd option, but it requires a server restart.\n A plugin can be installed with the mariadb-plugin utility, while the server is completely offline.\n\nWhen you are installing a plugin, you also have to ensure that:\n\n The server's plugin directory is properly configured, and the plugin's library is in the plugin directory.\n The server's minimum plugin maturity is properly configured, and the plugin is mature enough to be installed.\n\nInstalling a Plugin Dynamically\n\nA plugin can be installed dynamically by executing either the INSTALL SONAME or the INSTALL PLUGIN statement.\n\nIf a plugin is installed with one of these statements, a record will be added to the mysql.plugins table for the plugin. This means that the plugin will automatically be loaded every time the server restarts, unless specifically uninstalled or deactivated.\n\nInstalling a Plugin with INSTALL SONAME\n\nYou can install a plugin dynamically by executing the INSTALL SONAME statement. INSTALL SONAME installs all plugins from the given plugin library. This could be required for some plugin libraries.\n\nFor example, to install all plugins in the server_audit plugin library (which is currently only the server_audit audit plugin), you could execute the following:\n\n`sql\nINSTALL SONAME 'server_audit';\n`\n\nInstalling a Plugin with INSTALL PLUGIN\n\nYou can install a plugin dynamically by executing the INSTALL PLUGIN statement. INSTALL PLUGIN installs a single plugin from the given plugin library.\n\nFor example, to install the server_audit audit plugin from the server_audit plugin library, you could execute the following:\n\n`sql\nINSTALL PLUGIN server_audit SONAME 'server_audit';\n`\n\nInstalling a Plugin with Plugin Load Options\n\nA plugin can be installed with a mariadbd option by providing either the --plugin-load-add or the --plugin-load option.\n\nIf a plugin is installed with one of these options, then a record will not be added to the mysql.plugins table for the plugin. This means that if the server is restarted without the same option set, then the plugin will not automatically be loaded.\n\nInstalling a Plugin with --plugin-load-add\n\nYou can install a plugin with the --plugin-load-add option by specifying the option as a command-line argument to mariadbd or by specifying the option in a relevant server option group in an option file.\n\nThe --plugin-load-add option uses the following format:\n\n Plugins can be specified in the format name=library, where name is the plugin name and library is the plugin library. This format installs a single plugin from the given plugin library.\n Plugins can also be specified in the format library, where library is the plugin library. This format installs all plugins from the given plugin library.\n Multiple plugins can be specified by separating them with semicolons.\n\nFor example, to install all plugins in the server_audit plugin library (which is currently only the server_audit audit plugin) and also the ed25519 authentication plugin from the auth_ed25519 plugin library, you could set the option to the following values on the command-line:\n\n`bash\n$ mariadbd --user=mysql --plugin-load-add='server_audit' --plugin-load-add='ed25519=auth_ed25519'\n`\n\nYou could also set the option to the same values in an option file:\n\n`ini\n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load_add = ed25519=auth_ed25519\n`\n\nSpecial care must be taken when specifying both the --plugin-load option and the --plugin-load-add option together. The --plugin-load option resets the plugin load list, and this can cause unexpected problems if you are not aware. The --plugin-load-add option does not reset the plugin load list, so it is much safer to use. See Specifying Multiple Plugin Load Options for more information.\n\nInstalling a Plugin with --plugin-load\n\nYou can install a plugin with the --plugin-load option by specifying the option as a command-line argument to mariadbd or by specifying the option in a relevant server option group in an option file.\n\nThe --plugin-load option uses the following format:\n\n Plugins can be specified in the format name=library, where name is the plugin name and library is the plugin library. This format installs a single plugin from the given plugin library.\n Plugins can also be specified in the format library, where library is the plugin library. This format installs all plugins from the given plugin library.\n Multiple plugins can be specified by separating them with semicolons.\n\nFor example, to install all plugins in the server_audit plugin library (which is currently only the server_audit audit plugin) and also the ed25519 authentication plugin from the auth_ed25519 plugin library, you could set the option to the following values on the command-line:\n\n`bash\n$ mariadbd --user=mysql --plugin-load='server_audit;ed25519=auth_ed25519'\n`\n\nYou could also set the option to the same values in an option file:\n\n`ini\n[mariadb]\n...\nplugin_load = server_audit;ed25519=auth_ed25519\n`\n\nSpecial care must be taken when specifying the --plugin-load option multiple times, or when specifying both the --plugin-load option and the --plugin-load-add option together. The --plugin-load option resets the plugin load list, and this can cause unexpected problems if you are not aware. The --plugin-load-add option does not reset the plugin load list, so it is much safer to use. See Specifying Multiple Plugin Load Options for more information.\n\nSpecifying Multiple Plugin Load Options\n\nSpecial care must be taken when specifying the --plugin-load option multiple times, or when specifying both the --plugin-load option and the --plugin-load-add option. The --plugin-load option resets the plugin load list, and this can cause unexpected problems if you are not aware. The --plugin-load-add option does not reset the plugin load list, so it is much safer to use.\n\nThis can have the following consequences:\n\n If the --plugin-load option is specified multiple times, then only the last instance will have any effect. For example, in the following case, the first instance of the option is reset:\n\n`ini\n[mariadb]\n...\nplugin_load = server_audit\nplugin_load = ed25519=auth_ed25519\n`\n\n If the --plugin-load option is specified after the --plugin-load-add option, then it will also reset the changes made by that option. For example, in the following case, the --plugin-load-add option does not do anything, because the subsequent --plugin-load option resets the plugin load list:\n\n`ini\n[mariadb]\n...\nplugin_load_add = server_audit\nplugin_load = ed25519=auth_ed25519\n`\n\n In contrast, if the --plugin-load option is specified before the --plugin-load-add option, then it will work fine, because the --plugin-load-add option does not reset the plugin load list. For example, in the following case, both plugins are properly loaded:\n\n`ini\n[mariadb]\n...\nplugin_load = server_audit\nplugin_load_add = ed25519=auth_ed25519\n`\n\nInstalling a Plugin with mariadb-plugin\n\nA plugin can be installed with the mariadb-plugin utility if the server is completely offline.\n\nThe syntax is:\n\n`sql\nmariadb-plugin [options] <plugin> ENABLE|DISABLE\n`\n\nFor example, to install the server_audit audit plugin, you could execute the following:\n\n`sql\nmariadb-plugin server_audit ENABLE\n`\n\nIf a plugin is installed with this utility, a record will be added to the mysql.plugins table for the plugin. This means that the plugin will automatically be loaded every time the server restarts, unless specifically uninstalled or deactivated.\n\nConfiguring the Plugin Directory\n\nWhen a plugin is being installed, the server looks for the plugin's library in the server's plugin directory. This directory is configured by the plugin_dir system variable. This can be specified as a command-line argument to mariadbd or it can be specified in a relevant server option group in an option file:\n\n`ini\n[mariadb]\n...\nplugin_dir = /usr/lib64/mysql/plugin\n`\n\nConfiguring the Minimum Plugin Maturity\n\nWhen a plugin is being installed, the server compares the plugin's maturity level against the server's minimum allowed plugin maturity. This can help prevent users from using unstable plugins on production servers. This minimum plugin maturity is configured by the plugin_maturity system variable. This can be specified as a command-line argument to mariadbd or it can be specified in a relevant server option group in an option file:\n\n`ini\n[mariadb]\n...\nplugin_maturity = stable\n`\n\nConfiguring Plugin Activation at Server Startup\n\nA plugin will be loaded by default when the server starts if:\n\n The plugin was installed with the INSTALL SONAME statement.\n The plugin was installed with the INSTALL PLUGIN statement.\n The plugin was installed with the mariadb-plugin utility.\n The server is configured to load the plugin with the --plugin-load-add option.\n The server is configured to load the plugin with the --plugin-load option.\n\nThis behavior can be changed with special options that take the form --plugin-name. For example, for the server_audit audit plugin, the special option is called --server-audit.\n\nThe possible values for these special options are:\n\n| Option Value           | Description                                                                                                                                                                                                                                                                                                                                                                                                               |\n| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| OFF                    | Disables the plugin without removing it from the mysql.plugins table.                                                                                                                                                                                                                                                                                 |\n| ON                     | Enables the plugin. If the plugin cannot be initialized, then the server will still continue starting up, but the plugin will be disabled.\n\n[Truncated — full content at mariadb.com/docs]