<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="reset-persist">
      </a>
      15.7.8.7 RESET PERSIST Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045168346224">
  </a>
  <a class="indexterm" name="idm46045168345152">
  </a>
  <a class="indexterm" name="idm46045168344064">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa20148422"><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">RESET</span> <span class="token keyword">PERSIST</span> <span class="token punctuation">[</span><span class="token punctuation">[</span><span class="token keyword">IF</span> <span class="token keyword">EXISTS</span><span class="token punctuation">]</span> <em class="replaceable">system_var_name</em><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET PERSIST
    </code>
   </a>
   removes persisted
        global system variable settings from the
   <code class="filename">
    mysqld-auto.cnf
   </code>
   option file in the data
        directory. Removing a persisted system variable causes the
        variable no longer to be initialized from
   <code class="filename">
    mysqld-auto.cnf
   </code>
   at server startup. For more
        information about persisting system variables and the
   <code class="filename">
    mysqld-auto.cnf
   </code>
   file, see
   <a class="xref" href="persisted-system-variables.html" title="7.1.9.3 Persisted System Variables">
    Section 7.1.9.3, “Persisted System Variables”
   </a>
   .
  </p>
  <p>
   The privileges required for
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET
        PERSIST
    </code>
   </a>
   depend on the type of system variable to be
        removed:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      For dynamic system variables, this statement requires the
      <a class="link" href="privileges-provided.html#priv_system-variables-admin">
       <code class="literal">
        SYSTEM_VARIABLES_ADMIN
       </code>
      </a>
      privilege (or the deprecated
      <a class="link" href="privileges-provided.html#priv_super">
       <code class="literal">
        SUPER
       </code>
      </a>
      privilege).
     </p>
    </li>
    <li class="listitem">
     <p>
      For read-only system variables, this statement requires the
      <a class="link" href="privileges-provided.html#priv_system-variables-admin">
       <code class="literal">
        SYSTEM_VARIABLES_ADMIN
       </code>
      </a>
      and
      <a class="link" href="privileges-provided.html#priv_persist-ro-variables-admin">
       <code class="literal">
        PERSIST_RO_VARIABLES_ADMIN
       </code>
      </a>
      privileges.
     </p>
    </li>
   </ul>
  </div>
  <p>
   See
   <a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
    Section 7.1.9.1, “System Variable Privileges”
   </a>
   .
  </p>
  <p>
   Depending on whether the variable name and
   <code class="literal">
    IF
        EXISTS
   </code>
   clauses are present, the
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET PERSIST
    </code>
   </a>
   statement has these
        forms:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      To remove all persisted variables from
      <code class="filename">
       mysqld-auto.cnf
      </code>
      , use
      <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
       <code class="literal">
        RESET PERSIST
       </code>
      </a>
      without naming
            any system variable:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa99651383"><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">RESET</span> <span class="token keyword">PERSIST</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      You must have privileges for removing both dynamic and
            read-only system variables if
      <code class="filename">
       mysqld-auto.cnf
      </code>
      contains both kinds of
            variables.
     </p>
    </li>
    <li class="listitem">
     <p>
      To remove a specific persisted variable from
      <code class="filename">
       mysqld-auto.cnf
      </code>
      , name it in the
            statement:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa10801183"><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">RESET</span> <span class="token keyword">PERSIST</span> <em class="replaceable">system_var_name</em><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      This includes plugin system variables, even if the plugin is
            not currently installed. If the variable is not present in
            the file, an error occurs.
     </p>
    </li>
    <li class="listitem">
     <p>
      To remove a specific persisted variable from
      <code class="filename">
       mysqld-auto.cnf
      </code>
      , but produce a warning
            rather than an error if the variable is not present in the
            file, add an
      <code class="literal">
       IF EXISTS
      </code>
      clause to the
            previous syntax:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa43718941"><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">RESET</span> <span class="token keyword">PERSIST</span> <span class="token keyword">IF</span> <span class="token keyword">EXISTS</span> <em class="replaceable">system_var_name</em><span class="token punctuation">;</span></code></pre>
     </div>
    </li>
   </ul>
  </div>
  <p>
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET PERSIST
    </code>
   </a>
   is not affected by
        the value of the
   <a class="link" href="server-system-variables.html#sysvar_persisted_globals_load">
    <code class="literal">
     persisted_globals_load
    </code>
   </a>
   system
        variable.
  </p>
  <p>
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET PERSIST
    </code>
   </a>
   affects the
        contents of the Performance Schema
   <a class="link" href="performance-schema-persisted-variables-table.html" title="29.12.14.1 Performance Schema persisted_variables Table">
    <code class="literal">
     persisted_variables
    </code>
   </a>
   table because
        the table contents correspond to the contents of the
   <code class="filename">
    mysqld-auto.cnf
   </code>
   file. On the other hand,
        because
   <a class="link" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
    <code class="literal">
     RESET PERSIST
    </code>
   </a>
   does not
        change variable values, it has no effect on the contents of the
        Performance Schema
   <a class="link" href="performance-schema-variables-info-table.html" title="29.12.14.2 Performance Schema variables_info Table">
    <code class="literal">
     variables_info
    </code>
   </a>
   table until the server is restarted.
  </p>
  <p>
   For information about
   <a class="link" href="reset.html" title="15.7.8.6 RESET Statement">
    <code class="literal">
     RESET
    </code>
   </a>
   statement variants that clear the state of other server
        operations, see
   <a class="xref" href="reset.html" title="15.7.8.6 RESET Statement">
    Section 15.7.8.6, “RESET Statement”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
