5.1.3. Server Options for Loading Plugins

The server can load plugins under the control of startup options. For example, many storage engines can be built in pluggable form and loaded when the server starts. In the following descriptions, plugin_name stands for a plugin name such as innodb.

In MySQL 5.5, these options control plugin loading:

  • --plugin_name=OFF

    Do not enable the plugin.

  • --plugin_name[=ON]

    Enable the plugin. If plugin initialization fails, start the server anyway, but with the plugin disabled. Specifying the option as --plugin_name without a value also enables the plugin.

  • --plugin_name=FORCE

    Enable the plugin. If plugin initialization fails, do not start the server. In other words, force the server to run with the plugin or not at all.

The values OFF, ON, and FORCE are not case sensitive.

If a plugin is disabled, either explicitly with OFF or implicitly because it was enabled with ON but failed to initialize, aspects of server operation that require the plugin will change. For example, if the plugin implements a storage engine, existing tables for the storage engine become inaccessible, and attempts to create new tables for the storage engine result in tables that use the default storage engine unless the NO_ENGINE_SUBSTITUTION SQL mode has been enabled to cause an error to occur instead.

Suppose that CSV, InnoDB, and ARCHIVE are built as pluggable storage engines and that you want the server to load them at startup, subject to these conditions: The server is permitted to run if CSV initialization fails, but must require that InnoDB initialization succeed. ARCHIVE should be disabled. To accomplish that, use these lines in an option file:

[mysqld]
csv=ON
innodb=FORCE
archive=OFF

--enable-plugin_name is also supported and is the same as --plugin_name=ON. --disable-plugin_name and --skip-plugin_name are also supported and are the same as --plugin_name=OFF.

Before MySQL 5.5, plugin options are boolean options (see Section 4.2.3.2, “Program Option Modifiers”). That is, any of these options enable the plugin:

--plugin_name
--plugin_name=1
--enable-plugin_name

And these options disable the plugin:

--plugin_name=0
--disable-plugin_name
--skip-plugin_name

If the plugin fails to initialize, the server runs with the plugin disabled.

If you upgrade to MySQL 5.5 from an older version and previously used options of the form --plugin_name=0 or --plugin_name=1, the equivalent options are now --plugin_name=OFF and --plugin_name=ON, respectively. You also have the choice of requiring plugins to start successfully by using --plugin_name=FORCE.

Plugins can also be loaded at runtime, using the INSTALL PLUGIN statement. See Section 12.4.3.1, “Installing and Uninstalling Plugins”.

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