<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="validate-password-transitioning">
      </a>
      8.4.3.3 Transitioning to the Password Validation Component
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045241087200">
  </a>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    In MySQL 8.4, the
    <code class="literal">
     validate_password
    </code>
    plugin was reimplemented
          as the
    <code class="literal">
     validate_password
    </code>
    component. The
    <code class="literal">
     validate_password
    </code>
    plugin is deprecated;
          expect it to be removed in a future version of MySQL.
   </p>
  </div>
  <p>
   MySQL installations that currently use the
   <code class="literal">
    validate_password
   </code>
   plugin should make the
        transition to using the
   <code class="literal">
    validate_password
   </code>
   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.)
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      Install the
      <code class="literal">
       validate_password
      </code>
      component:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa99034756"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">INSTALL</span> <span class="token keyword">COMPONENT</span> <span class="token string">'file://component_validate_password'</span><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      Test the
      <code class="literal">
       validate_password
      </code>
      component to
            ensure that it works as expected. If you need to set any
      <code class="literal">
       validate_password.
       <em class="replaceable">
        <code>
         xxx
        </code>
       </em>
      </code>
      system variables, you can do so at runtime using
      <code class="literal">
       SET
            GLOBAL
      </code>
      . (Any option file changes that must be made
            are performed in the next step.)
     </p>
    </li>
    <li class="listitem">
     <p>
      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:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa40389639"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token constant">validate-password</span><span class="token attr-value"><span class="token punctuation">=</span>FORCE_PLUS_PERMANENT</span>
<span class="token constant">validate_password_dictionary_file</span><span class="token attr-value"><span class="token punctuation">=</span>/usr/share/dict/words</span>
<span class="token constant">validate_password_length</span><span class="token attr-value"><span class="token punctuation">=</span>10</span>
<span class="token constant">validate_password_number_count</span><span class="token attr-value"><span class="token punctuation">=</span>2</span></code></pre>
     </div>
     <p>
      Those settings are appropriate for the plugin, but must be
            modified to apply to the component. To adjust the option
            file, omit the
      <a class="link" href="validate-password-options-variables.html#option_mysqld_validate-password">
       <code class="option">
        --validate-password
       </code>
      </a>
      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:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa98755711"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token constant">validate_password.dictionary_file</span><span class="token attr-value"><span class="token punctuation">=</span>/usr/share/dict/words</span>
<span class="token constant">validate_password.length</span><span class="token attr-value"><span class="token punctuation">=</span>10</span>
<span class="token constant">validate_password.number_count</span><span class="token attr-value"><span class="token punctuation">=</span>2</span></code></pre>
     </div>
     <p>
      Similar adjustments are needed for applications that refer
            at runtime to
      <code class="literal">
       validate_password
      </code>
      plugin
            system and status variables. Change the no-dot plugin
            variable names to the corresponding dotted component
            variable names.
     </p>
    </li>
    <li class="listitem">
     <p>
      Uninstall the
      <code class="literal">
       validate_password
      </code>
      plugin:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa39615810"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">UNINSTALL</span> <span class="token keyword">PLUGIN</span> validate_password<span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      If the
      <code class="literal">
       validate_password
      </code>
      plugin is loaded
            at server startup using a
      <a class="link" href="server-options.html#option_mysqld_plugin-load">
       <code class="option">
        --plugin-load
       </code>
      </a>
      or
      <a class="link" href="server-options.html#option_mysqld_plugin-load-add">
       <code class="option">
        --plugin-load-add
       </code>
      </a>
      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.
     </p>
    </li>
    <li class="listitem">
     <p>
      Restart the server.
     </p>
    </li>
   </ol>
  </div>
 </div>
 <br/>
</div>
