<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="enterprise-encryption-installation">
      </a>
      8.6.1 MySQL Enterprise Encryption Installation and Upgrading
     </h3>
    </div>
   </div>
  </div>
  <p>
   The functions are provided by a MySQL component
   <code class="literal">
    component_enterprise_encryption
   </code>
   , and installing
      the component installs all of the functions.
  </p>
  <p>
   MySQL Enterprise Encryption functions are provided by the MySQL
   <code class="literal">
    component_enterprise_encryption
   </code>
   component. For
      upgrade information, see
   <a class="ulink" href="/doc/refman/8.0/en/enterprise-encryption-installation.html#enterprise-encryption-upgrading" target="_top">
    Upgrading MySQL Enterprise Encryption
   </a>
   .
  </p>
  <p>
   If you are upgrading from a release prior to MySQL 8.0.30: Before
      installing the component, unload any legacy functions using the
   <a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
    <code class="literal">
     DROP
      FUNCTION
    </code>
   </a>
   statement:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa69645394"><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">DROP</span> <span class="token keyword">FUNCTION</span> asymmetric_decrypt<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> asymmetric_derive<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> asymmetric_encrypt<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> asymmetric_sign<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> asymmetric_verify<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> create_asymmetric_priv_key<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> create_asymmetric_pub_key<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> create_dh_parameters<span class="token punctuation">;</span>
<span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> create_digest<span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   The function names must be specified in lowercase. The statements
      require the
   <a class="link" href="privileges-provided.html#priv_drop">
    <code class="literal">
     DROP
    </code>
   </a>
   privilege for the
   <code class="literal">
    mysql
   </code>
   database.
  </p>
  <p>
   To install the component, issue this
   <a class="link" href="install-component.html" title="15.7.4.3 INSTALL COMPONENT Statement">
    <code class="literal">
     INSTALL
      COMPONENT
    </code>
   </a>
   statement:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa69544216"><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_enterprise_encryption"</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   <a class="link" href="install-component.html" title="15.7.4.3 INSTALL COMPONENT Statement">
    <code class="literal">
     INSTALL COMPONENT
    </code>
   </a>
   requires the
   <a class="link" href="privileges-provided.html#priv_insert">
    <code class="literal">
     INSERT
    </code>
   </a>
   privilege for the
   <code class="literal">
    mysql.component
   </code>
   system table because it adds a
      row to that table to register the component. To verify that the
      component has been installed, issue the statement shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa38609271"><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">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> mysql<span class="token punctuation">.</span><span class="token keyword">component</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   Components listed in
   <code class="literal">
    mysql.component
   </code>
   are loaded
      by the loader service during the startup sequence.
  </p>
  <p>
   If you need to uninstall the component, issue an
   <a class="link" href="uninstall-component.html" title="15.7.4.5 UNINSTALL COMPONENT Statement">
    <code class="literal">
     UNINSTALL COMPONENT
    </code>
   </a>
   statement:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa6090175"><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">COMPONENT</span> <span class="token string">"file://component_enterprise_encryption"</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   Uninstalling the component uninstalls all of the functions. For
      more details, see
   <a class="xref" href="component-loading.html" title="7.5.1 Installing and Uninstalling Components">
    Section 7.5.1, “Installing and Uninstalling Components”
   </a>
   .
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    Installing the component installs all of its functions, so you
        do not need to create them using
    <a class="link" href="create-function.html" title="15.1.14 CREATE FUNCTION Statement">
     <code class="literal">
      CREATE
        FUNCTION
     </code>
    </a>
    statements as in older releases of MySQL.
   </p>
  </div>
  <p>
   When you have installed the component, if you want the component
      functions to support decryption and verification for content
      produced by legacy functions, set the
   <a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.rsa_support_legacy_padding">
    <code class="literal">
     enterprise_encryption.rsa_support_legacy_padding
    </code>
   </a>
   system variable to
   <code class="literal">
    ON
   </code>
   . Also, if you want to
      change the maximum length allowed for the RSA keys generated by
      the component functions, use the
   <a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.maximum_rsa_key_size">
    <code class="literal">
     enterprise_encryption.maximum_rsa_key_size
    </code>
   </a>
   system variable to set an appropriate maximum. For configuration
      information, see
   <a class="xref" href="enterprise-encryption-configuring.html" title="8.6.2 Configuring MySQL Enterprise Encryption">
    Section 8.6.2, “Configuring MySQL Enterprise Encryption”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
