This section describes how to install the password-validation plugin. For general information about installing plugins, see Installing and Uninstalling Plugins.
To be usable by the server, the plugin library file must be
located in the MySQL plugin directory (the directory named by
variable). If necessary, set the value of
plugin_dir at server startup to
tell the server the location of the plugin directory.
The plugin library file base name is
validate_password. The file name suffix
differs per platform (for example,
Unix and Unix-like systems,
To load the plugin at server startup, use the
--plugin-load option to name the
library file that contains the plugin. With this plugin-loading
method, the option must be given each time the server starts.
For example, put these lines in your
file (adjust the
.so suffix for your
platform as necessary):
Alternatively, to register the plugin at runtime, use this statement (adjust the extension as necessary):
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
INSTALL PLUGIN loads the plugin,
and also registers it in the
table to cause the plugin to be loaded for each subsequent
normal server startup.
If the plugin has been previously registered with
INSTALL PLUGIN or is loaded with
--plugin-load, you can use the
--validate-password option at server startup to
control plugin activation. For example, to load the plugin at
startup and prevent it from being removed at runtime, use these
[mysqld] plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT
If it is desired to prevent the server from running without the
password-validation plugin, use
--validate-password with a value
FORCE_PLUS_PERMANENT to force server startup
to fail if the plugin does not initialize successfully.
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS->
WHERE PLUGIN_NAME LIKE 'validate%';+-------------------+---------------+ | PLUGIN_NAME | PLUGIN_STATUS | +-------------------+---------------+ | validate_password | ACTIVE | +-------------------+---------------+