Components must be loaded into the server before they can be used. MySQL supports manual component loading at runtime and automatic loading during server startup.
While a component is loaded, information about it is available as described in Section 5.5.2, “Obtaining Component Information”.
INSTALL COMPONENT 'file://component_validate_password'; UNINSTALL COMPONENT 'file://component_validate_password';
A loader service handles component loading and unloading, and also
registers loaded components in the
mysql.component system table.
The SQL statements for component manipulation affect server
operation and the
mysql.component system table
INSTALL COMPONENTloads components into the server. The components become active immediately. The loader service also registers loaded components in the
mysql.componentsystem table. For subsequent server restarts, the loader service loads any components listed in
mysql.componentduring the startup sequence. This occurs even if the server is started with the
UNINSTALL COMPONENTdeactivates components and unloads them from the server. The loader service also unregisters the components from the
mysql.componentsystem table so that the server no longer loads them during its startup sequence for subsequent restarts.
Compared to the corresponding
PLUGIN statement for server plugins, the
INSTALL COMPONENT statement for
components offers the significant advantage that it is not
necessary to know any platform-specific file name suffix for
naming the component. This means that a given
INSTALL COMPONENT statement can be
executed uniformly across platforms.
A component when installed may also automatically install related user-defined functions (UDFs). If so, the component when uninstalled also automatically uninstalls those UDFs.