<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-events">
      </a>
      15.7.7.19 SHOW EVENTS Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045170440448">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa92524843"><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">SHOW</span> <span class="token keyword">EVENTS</span>
    <span class="token punctuation">[</span>{<span class="token keyword">FROM</span> <span class="token operator">|</span> <span class="token keyword">IN</span>} <span class="token keyword"><em class="replaceable">schema_name</em></span><span class="token punctuation">]</span>
    <span class="token punctuation">[</span><span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">pattern</em>'</span> <span class="token operator">|</span> <span class="token keyword">WHERE</span> <em class="replaceable">expr</em><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   This statement displays information about Event Manager events,
        which are discussed in
   <a class="xref" href="event-scheduler.html" title="27.4 Using the Event Scheduler">
    Section 27.4, “Using the Event Scheduler”
   </a>
   . It
        requires the
   <a class="link" href="privileges-provided.html#priv_event">
    <code class="literal">
     EVENT
    </code>
   </a>
   privilege for
        the database from which the events are to be shown.
  </p>
  <p>
   In its simplest form,
   <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
    <code class="literal">
     SHOW EVENTS
    </code>
   </a>
   lists all of the events in the current schema:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa22929626"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token function">CURRENT_USER</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">SCHEMA</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> CURRENT_USER() <span class="token punctuation">|</span> SCHEMA() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> jon@ghidora    <span class="token punctuation">|</span> myschema <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">EVENTS</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
                  Db<span class="token punctuation">:</span> myschema
                Name<span class="token punctuation">:</span> e_daily
             Definer<span class="token punctuation">:</span> jon@ghidora
           Time zone<span class="token punctuation">:</span> SYSTEM
                Type<span class="token punctuation">:</span> RECURRING
          Execute at<span class="token punctuation">:</span> NULL
      Interval value<span class="token punctuation">:</span> 1
      Interval field<span class="token punctuation">:</span> DAY
              Starts<span class="token punctuation">:</span> 2018-08-08 11<span class="token punctuation">:</span>06<span class="token punctuation">:</span>34
                Ends<span class="token punctuation">:</span> NULL
              Status<span class="token punctuation">:</span> ENABLED
          Originator<span class="token punctuation">:</span> 1
character_set_client<span class="token punctuation">:</span> utf8mb4
collation_connection<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
  Database Collation<span class="token punctuation">:</span> utf8mb4_0900_ai_ci</span></code></pre>
  </div>
  <p>
   To see events for a specific schema, use the
   <code class="literal">
    FROM
   </code>
   clause. For example, to see events for
        the
   <code class="literal">
    test
   </code>
   schema, use the following statement:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa57646886"><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">SHOW</span> <span class="token keyword">EVENTS</span> <span class="token keyword">FROM</span> test<span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   The
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, if present,
        indicates which event names to match. The
   <code class="literal">
    WHERE
   </code>
   clause can be given to select rows
        using more general conditions, as discussed in
   <a class="xref" href="extended-show.html" title="28.8 Extensions to SHOW Statements">
    Section 28.8, “Extensions to SHOW Statements”
   </a>
   .
  </p>
  <p>
   <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
    <code class="literal">
     SHOW EVENTS
    </code>
   </a>
   output has these
        columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Db
      </code>
     </p>
     <p>
      The name of the schema (database) to which the event
            belongs.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Name
      </code>
     </p>
     <p>
      The name of the event.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Definer
      </code>
     </p>
     <p>
      The account of the user who created the event, in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         user_name
        </code>
       </em>
       '@'
       <em class="replaceable">
        <code>
         host_name
        </code>
       </em>
       '
      </code>
      format.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Time zone
      </code>
     </p>
     <p>
      The event time zone, which is the time zone used for
            scheduling the event and that is in effect within the event
            as it executes. The default value is
      <code class="literal">
       SYSTEM
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Type
      </code>
     </p>
     <p>
      The event repetition type, either
      <code class="literal">
       ONE
            TIME
      </code>
      (transient) or
      <code class="literal">
       RECURRING
      </code>
      (repeating).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Execute At
      </code>
     </p>
     <p>
      For a one-time event, this is the
      <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
       <code class="literal">
        DATETIME
       </code>
      </a>
      value specified in
            the
      <code class="literal">
       AT
      </code>
      clause of the
      <a class="link" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
       <code class="literal">
        CREATE EVENT
       </code>
      </a>
      statement used
            to create the event, or of the last
      <a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
       <code class="literal">
        ALTER EVENT
       </code>
      </a>
      statement that
            modified the event. The value shown in this column reflects
            the addition or subtraction of any
      <code class="literal">
       INTERVAL
      </code>
      value included in the event's
      <code class="literal">
       AT
      </code>
      clause. For example, if an event is
            created using
      <code class="literal">
       ON SCHEDULE AT CURRENT_TIMESTAMP +
            '1:6' DAY_HOUR
      </code>
      , and the event was created at
            2018-02-09 14:05:30, the value shown in this column would be
      <code class="literal">
       '2018-02-10 20:05:30'
      </code>
      . If the event's
            timing is determined by an
      <code class="literal">
       EVERY
      </code>
      clause
            instead of an
      <code class="literal">
       AT
      </code>
      clause (that is, if the
            event is recurring), the value of this column is
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Interval Value
      </code>
     </p>
     <p>
      For a recurring event, the number of intervals to wait
            between event executions. For a transient event, the value
            of this column is always
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Interval Field
      </code>
     </p>
     <p>
      The time units used for the interval which a recurring event
            waits before repeating. For a transient event, the value of
            this column is always
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Starts
      </code>
     </p>
     <p>
      The start date and time for a recurring event. This is
            displayed as a
      <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
       <code class="literal">
        DATETIME
       </code>
      </a>
      value, and is
      <code class="literal">
       NULL
      </code>
      if no start date and
            time are defined for the event. For a transient event, this
            column is always
      <code class="literal">
       NULL
      </code>
      . For a recurring
            event whose definition includes a
      <code class="literal">
       STARTS
      </code>
      clause, this column contains the corresponding
      <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
       <code class="literal">
        DATETIME
       </code>
      </a>
      value. As with the
      <code class="literal">
       Execute At
      </code>
      column, this value resolves
            any expressions used. If there is no
      <code class="literal">
       STARTS
      </code>
      clause affecting the timing of the
            event, this column is
      <code class="literal">
       NULL
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Ends
      </code>
     </p>
     <p>
      For a recurring event whose definition includes a
      <code class="literal">
       ENDS
      </code>
      clause, this column contains the
            corresponding
      <a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
       <code class="literal">
        DATETIME
       </code>
      </a>
      value.
            As with the
      <code class="literal">
       Execute At
      </code>
      column, this value
            resolves any expressions used. If there is no
      <code class="literal">
       ENDS
      </code>
      clause affecting the timing of the
            event, this column is
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Status
      </code>
     </p>
     <p>
      The event status. One of
      <code class="literal">
       ENABLED
      </code>
      ,
      <code class="literal">
       DISABLED
      </code>
      , or
      <code class="literal">
       REPLICA_SIDE_DISABLED
      </code>
      .
      <code class="literal">
       REPLICA_SIDE_DISABLED
      </code>
      indicates that the
            creation of the event occurred on another MySQL server
            acting as a replication source and replicated to the current
            MySQL server which is acting as a replica, but the event is
            not presently being executed on the replica. For more
            information, see
      <a class="xref" href="replication-features-invoked.html" title="19.5.1.16 Replication of Invoked Features">
       Section 19.5.1.16, “Replication of Invoked Features”
      </a>
      . information.
     </p>
     <p>
      <code class="literal">
       REPLICA_SIDE_DISABLED
      </code>
      replaces
      <code class="literal">
       SLAVESIDE_DISABLED
      </code>
      , which is now
            deprecated and subject to removal in a future version of
            MySQL.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Originator
      </code>
     </p>
     <p>
      The server ID of the MySQL server on which the event was
            created; used in replication. This value may be updated by
      <a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
       <code class="literal">
        ALTER EVENT
       </code>
      </a>
      to the server ID
            of the server on which that statement occurs, if executed on
            a source server. The default value is 0.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       character_set_client
      </code>
     </p>
     <p>
      The session value of the
      <a class="link" href="server-system-variables.html#sysvar_character_set_client">
       <code class="literal">
        character_set_client
       </code>
      </a>
      system
            variable when the event was created.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       collation_connection
      </code>
     </p>
     <p>
      The session value of the
      <a class="link" href="server-system-variables.html#sysvar_collation_connection">
       <code class="literal">
        collation_connection
       </code>
      </a>
      system
            variable when the event was created.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Database Collation
      </code>
     </p>
     <p>
      The collation of the database with which the event is
            associated.
     </p>
    </li>
   </ul>
  </div>
  <p>
   For more information about
   <code class="literal">
    REPLICA_SIDE_DISABLED
   </code>
   and the
   <code class="literal">
    Originator
   </code>
   column, see
   <a class="xref" href="replication-features-invoked.html" title="19.5.1.16 Replication of Invoked Features">
    Section 19.5.1.16, “Replication of Invoked Features”
   </a>
   .
  </p>
  <p>
   Times displayed by
   <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
    <code class="literal">
     SHOW EVENTS
    </code>
   </a>
   are given in the event time zone, as discussed in
   <a class="xref" href="events-metadata.html" title="27.4.4 Event Metadata">
    Section 27.4.4, “Event Metadata”
   </a>
   .
  </p>
  <p>
   Event information is also available from the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
    <code class="literal">
     EVENTS
    </code>
   </a>
   table. See
   <a class="xref" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
    Section 28.3.14, “The INFORMATION_SCHEMA EVENTS Table”
   </a>
   .
  </p>
  <p>
   The event action statement is not shown in the output of
   <a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
    <code class="literal">
     SHOW EVENTS
    </code>
   </a>
   . Use
   <a class="link" href="show-create-event.html" title="15.7.7.8 SHOW CREATE EVENT Statement">
    <code class="literal">
     SHOW CREATE EVENT
    </code>
   </a>
   or the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
    <code class="literal">
     EVENTS
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
