The server plugin implementation comprises several components.
INSTALL PLUGINregisters a plugin in the
mysql.plugintable and loads the plugin code.
UNINSTALL PLUGINunregisters a plugin from the
mysql.plugintable and unloads the plugin code.
WITH PARSERclause for full-text index creation associates a full-text parser plugin with a given
SHOW PLUGINSdisplays information about server plugins.
Command-line options and system variables:
--plugin-loadoption enables plugins to be loaded at server startup time.
plugin_dirsystem variable indicates the location of the directory where all plugins must be installed. The value of this variable can be specified at server startup with a
--plugin_dir=option. mysql_config --plugindir displays the default plugin directory path name.
For additional information about plugin loading, see Section 188.8.131.52, “Installing and Uninstalling Plugins”.
INFORMATION_SCHEMA.PLUGINStable contains plugin information.
mysql.plugintable lists each plugin that was installed with
INSTALL PLUGINand is required for plugin use. For new MySQL installations, this table is created during the installation process. If you are upgrading from a version of MySQL older than 5.1, you should run mysql_upgrade to update your system tables and create the
plugintable (see Section 4.4.8, “mysql_upgrade — Check and Upgrade MySQL Tables”).
Source files (the locations indicate where the files are found in MySQL source distributions):
plugin.hexposes the public plugin API. This file should be examined by anyone who wants to write a plugin library.
plugin_files provide additional information that pertains to specific types of plugins.
sql_plugin.cccomprise the internal plugin implementation. These files need not be consulted by plugin developers. They may be of interest for those who want to know more about how the server handles plugins.