12.4.3.1. Installing and Uninstalling Plugins

This section compares the various methods of installing and uninstalling server plugins.

INSTALL PLUGIN statement:

  • Loads the plugin code to activate it.

  • Registers the plugin in the mysql.plugin table. Registration causes the server to load the plugin automatically for subsequent restarts. That is, it effects an installation that persists until the plugin is uninstalled explicitly.

  • Requires the INSERT privilege for the mysql.plugin table.

--plugin-load option:

  • Loads the plugin code to activate it.

  • Does not register the plugin in mysql.plugin. For subsequent restarts, the server loads the plugin again only if --plugin-load is given again. That is, this option effects a one-time installation that persists only for one server invocation.

UNINSTALL PLUGIN statement:

  • Unloads the plugin code to deactivate it.

  • Unregisters the plugin from mysql.plugin. The server will not load it automatically for subsequent restarts.

  • Requires the DELETE privilege for the mysql.plugin table.

While a plugin is loaded, information about it is available at runtime from these sources:

If --plugin-load is given at startup for a plugin already installed with INSTALL PLUGIN during a previous server invocation, the server starts but writes these messages to the error log:

100310 19:15:44 [ERROR] Function 'plugin_name' already exists
100310 19:15:44 [Warning] Couldn't load plugin named 'plugin_name'
with soname 'plugin_object_file'.

UNINSTALL PLUGIN can unload plugins regardless of whether they were loaded with INSTALL PLUGIN or --plugin-load. In the latter case, UNINSTALL PLUGIN does not unregister the plugin from mysql.plugin because --plugin-load did not register it.

UNINSTALL PLUGIN cannot unload plugins that are compiled into the server. (These can be identified as those that have a library name of NULL in the output from INFORMATION_SCHEMA.PLUGINS or SHOW PLUGINS.)

If the server is started with the --skip-grant-tables option, it does not consult the mysql.plugins table and thus does not load plugins installed with the INSTALL PLUGIN statement. --plugin-load enables plugins to be loaded even when --skip-grant-tables is given. --plugin-load also enables plugins to be loaded at startup under configurations when plugins cannot be loaded at runtime.

Copyright © 2010-2017 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout