MySQL Server includes a component-based infrastructure for extending server capabilities:
A component provides services that are available to the server and other components. (With respect to service use, the server is a component, equal to other components.) Components interact with each other only through the services they provide.
INSTALL COMPONENT 'file://component_validate_password'; UNINSTALL COMPONENT 'file://component_validate_password';
A loader service handles component loading and unloading, and also lists loaded components in the
mysql.componentsystem table that serves as a registry.
The SQL statements for component manipulation affect server
operation and the
mysql.component system table as
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, any components listed in
mysql.componentare loaded by the loader service during 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 they are no longer loaded during the startup sequence for subsequent server 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
COMPONENT statement can be executed uniformly across
To see which components are installed, use this statement:
SELECT * FROM mysql.component;
MySQL distributions include several components that implement server extensions:
A component for checking passwords. See Section 6.5.3, “The Password Validation Component”.
System and status variables implemented by a server component are
exposed when the component is installed and have names that begin
with a component-specific prefix. For example, the
log_filter_dragnet error log filter component
implements a system variable named
log_error_filter_rules, the full name of which is
refer to this variable, use the full name.
For information about the internal implementation of components, see https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_EXTENDING.html. For example, if you intend to write your own components, this information is important for understanding how components work.