<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="audit-log-disabling">
      </a>
      8.4.5.9 Disabling Audit Logging
     </h4>
    </div>
   </div>
  </div>
  <p>
   The
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   variable
        permits disabling audit logging for all connecting and connected
        sessions. The
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   variable can be set in a MySQL Server option file, in a
        command-line startup string, or at runtime using a
   <a class="link" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
    <code class="literal">
     SET
    </code>
   </a>
   statement; for example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa9310449"><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">SET</span> <span class="token keyword">GLOBAL</span> audit_log_disable <span class="token operator">=</span> <span class="token boolean">true</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   Setting
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   to
        true disables the audit log plugin. The plugin is re-enabled
        when
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   is set
        back to
   <code class="literal">
    false
   </code>
   , which is the default setting.
  </p>
  <p>
   Starting the audit log plugin with
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable = true
    </code>
   </a>
   generates a warning
        (
   <a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_warn_audit_log_disabled" target="_top">
    <code class="literal">
     ER_WARN_AUDIT_LOG_DISABLED
    </code>
   </a>
   )
        with the following message:
   <span class="errortext">
    Audit Log is disabled.
        Enable it with audit_log_disable = false
   </span>
   . Setting
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   to false also
        generates warning. When
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   is set to
        true, audit log function calls and variable changes generate a
        session warning.
  </p>
  <p>
   Setting the runtime value of
   <a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
    <code class="literal">
     audit_log_disable
    </code>
   </a>
   requires the
   <a class="link" href="privileges-provided.html#priv_audit-admin">
    <code class="literal">
     AUDIT_ADMIN
    </code>
   </a>
   privilege, in
        addition to 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) normally required to set a global system variable
        runtime value.
  </p>
 </div>
 <br/>
</div>
