<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="error-log">
      </a>
      7.4.2 The Error Log
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="error-log-configuration.html">
       7.4.2.1 Error Log Configuration
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-destination-configuration.html">
       7.4.2.2 Default Error Log Destination Configuration
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-event-fields.html">
       7.4.2.3 Error Event Fields
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-filtering.html">
       7.4.2.4 Types of Error Log Filtering
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-priority-based-filtering.html">
       7.4.2.5 Priority-Based Error Log Filtering (log_filter_internal)
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-rule-based-filtering.html">
       7.4.2.6 Rule-Based Error Log Filtering (log_filter_dragnet)
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-json.html">
       7.4.2.7 Error Logging in JSON Format
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-syslog.html">
       7.4.2.8 Error Logging to the System Log
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-format.html">
       7.4.2.9 Error Log Output Format
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="error-log-rotation.html">
       7.4.2.10 Error Log File Flushing and Renaming
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <p>
   This section discusses how to configure the MySQL server for
      logging of diagnostic messages to the error log. For information
      about selecting the error message character set and language, see
   <a class="xref" href="charset-errors.html" title="12.6 Error Message Character Set">
    Section 12.6, “Error Message Character Set”
   </a>
   , and
   <a class="xref" href="error-message-language.html" title="12.12 Setting the Error Message Language">
    Section 12.12, “Setting the Error Message Language”
   </a>
   .
  </p>
  <p>
   The error log contains a record of
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   startup and shutdown times. It also contains diagnostic messages
      such as errors, warnings, and notes that occur during server
      startup and shutdown, and while the server is running. For
      example, if
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   notices that a table needs
      to be automatically checked or repaired, it writes a message to
      the error log.
  </p>
  <p>
   Depending on error log configuration, error messages may also
      populate the Performance Schema
   <a class="link" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    <code class="literal">
     error_log
    </code>
   </a>
   table, to provide an SQL
      interface to the log and enable its contents to be queried. See
   <a class="xref" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
    Section 29.12.22.2, “The error_log Table”
   </a>
   .
  </p>
  <p>
   On some operating systems, the error log contains a stack trace if
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   exits abnormally. The trace can be used
      to determine where
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   exited. See
   <a class="xref" href="debugging-mysql.html" title="7.9 Debugging MySQL">
    Section 7.9, “Debugging MySQL”
   </a>
   .
  </p>
  <p>
   If used to start
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   ,
   <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
    <span class="command">
     <strong>
      mysqld_safe
     </strong>
    </span>
   </a>
   may write messages to the error
      log. For example, when
   <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
    <span class="command">
     <strong>
      mysqld_safe
     </strong>
    </span>
   </a>
   notices
      abnormal
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   exits, it restarts
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   and writes a
   <code class="literal">
    mysqld
      restarted
   </code>
   message to the error log.
  </p>
  <p>
   The following sections discuss aspects of configuring error
      logging.
  </p>
 </div>
 <br/>
</div>
