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 5.5.2, “Installing and Uninstalling Plugins”.
The client plugin implementation is simpler:
mysql_options()C API function, the
MYSQL_PLUGIN_DIRoptions enable client programs to load authentication plugins.
There are C API functions that enable management of client plugins.
To examine how MySQL implements plugins, consult the following source files in a MySQL source distribution:
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.
client_plugin.hcontains information specific to client plugins.
sql_plugin.cccomprise the internal plugin implementation.
sql_acl.ccis where the server uses authentication plugins. 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.
client_plugin.himplements the C API client plugin functions, and
client.cimplements client authentication support. 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.