Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 259.0Kb
Man Pages (Zip) - 366.2Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 Reference Manual  / ...  / Security  / Security Components and Plugins  / The Password Validation Component  /  Transitioning to the Password Validation Component

8.4.3.3 Transitioning to the Password Validation Component

Note

In MySQL 9.0, thevalidate_password plugin was reimplemented as thevalidate_password component. Thevalidate_password plugin is deprecated; expect it to be removed in a future version of MySQL.

MySQL installations that currently use thevalidate_password plugin should make the transition to using thevalidate_password component instead. To do so, use the following procedure. The procedure installs the component before uninstalling the plugin, to avoid having a time window during which no password validation occurs. (The component and plugin can be installed simultaneously. In this case, the server attempts to use the component, falling back to the plugin if the component is unavailable.)

  1. Install thevalidate_password component:

    INSTALL COMPONENT 'file://component_validate_password';
  2. Test thevalidate_password component to ensure that it works as expected. If you need to set anyvalidate_password.xxx system variables, you can do so at runtime usingSET GLOBAL. (Any option file changes that must be made are performed in the next step.)

  3. Adjust any references to the plugin system and status variables to refer to the corresponding component system and status variables. Suppose that previously you had configured the plugin at startup using an option file like this:

    [mysqld]validate-password=FORCE_PLUS_PERMANENTvalidate_password_dictionary_file=/usr/share/dict/wordsvalidate_password_length=10validate_password_number_count=2

    Those settings are appropriate for the plugin, but must be modified to apply to the component. To adjust the option file, omit the--validate-password option (it applies only to the plugin, not the component), and modify the system variable references from no-dot names appropriate for the plugin to dotted names appropriate for the component:

    [mysqld]validate_password.dictionary_file=/usr/share/dict/wordsvalidate_password.length=10validate_password.number_count=2

    Similar adjustments are needed for applications that refer at runtime tovalidate_password plugin system and status variables. Change the no-dot plugin variable names to the corresponding dotted component variable names.

  4. Uninstall thevalidate_password plugin:

    UNINSTALL PLUGIN validate_password;

    If thevalidate_password plugin is loaded at server startup using a--plugin-load or--plugin-load-add option, omit that option from the server startup procedure. For example, if the option is listed in a server option file, remove it from the file.

  5. Restart the server.