INSTALL SONAME 'plugin_library'
MariaDB starting with 5.5.21
It is supported starting from MariaDB 5.5.21.
plugin_library is the name of the shared library that
contains the plugin code. The file name extension (for
libmyplugin.dll) can be omitted (which makes the statement look the same on all architectures).
The shared library must be located in the plugin directory (that is,
the directory named by the plugin_dir system variable). The library must be in the plugin directory itself, not in a subdirectory. By
default, plugin_dir is plugin directory under the directory named by
the pkglibdir configuration variable, but it can be changed by setting
the value of
plugin_dir at server startup. For example, set
its value in a my.cnf file:
If the value of plugin_dir is a relative path name, it is taken to be relative to the MySQL base directory (the value of the basedir system variable).
INSTALL SONAME adds one or more lines to the mysql.plugin table that
describes the plugin. This table contains the plugin name and library file
INSTALL SONAME causes the server to read
option (my.cnf) files just as during server startup. This enables the plugin to
pick up any relevant options from those files. It is possible to add plugin
options to an option file even before loading a plugin (if the loose prefix is
used). It is also possible to uninstall a plugin, edit my.cnf, and install the
plugin again. Restarting the plugin this way enables it to the new option
values without a server restart.
INSTALL SONAME also loads and initializes the plugin code to
make the plugin available for use. A plugin is initialized by executing its
initialization function, which handles any setup that the plugin must perform
before it can be used.
INSTALL SONAME, you must have the
INSERT privilege for the mysql.plugin table.
At server startup, the server loads and initializes any plugin that is
listed in the mysql.plugin table. This means that a plugin is installed
INSTALL SONAME only once, not every time the server
starts. Plugin loading at startup does not occur if the server is started with
When the server shuts down, it executes the deinitialization function for each plugin that is loaded so that the plugin has a chance to perform any final cleanup.
If you need to load plugins for a single server startup when the
--skip-grant-tables option is given (which tells the server
not to read system tables), use the
--plugin-load mysqld option.
If you need to install only one plugin from a library, use the INSTALL PLUGIN statement.
To load the XtraDB storage engine and all of its INFORMATION_SCHEMA tables with one statement, use
INSTALL SONAME 'ha_xtradb';
This statement can be used instead of INSTALL PLUGIN even when the library contains only one plugin:
INSTALL SONAME 'ha_sequence';