SHOW EVENTS [FROMschema_name] [LIKEpattern]
In its simplest form, SHOW EVENTS lists all
of the events in the current schema:
mysql>SELECT CURRENT_USER(), SCHEMA();+----------------+----------+ | CURRENT_USER() | SCHEMA() | +----------------+----------+ | jon@ghidora | myschema | +----------------+----------+ 1 row in set (0.00 sec) mysql>SHOW EVENTS\G*************************** 1. row *************************** Db: myschema Name: e_daily Definer: jon@ghidora Time zone: SYSTEM Type: RECURRING Execute at: NULL Interval value: 10 Interval field: INTERVAL_SECOND Starts: 2006-02-09 10:41:23 Ends: 0000-00-00 00:00:00 Status: ENABLED 1 row in set (0.01 sec)
The columns in the output of SHOW EVENTS
— which are similar to, but not identical to the columns
in the INFORMATION_SCHEMA.EVENTS table
— are shown here:
Db: The schema (database) on which the
event is defined.
Name: The name of the event.
Time zone: The time zone in effect when
schedule for the event was last modified. If the event's
schedule has not been modified since the event was
created, then this is the time zone that was in effect at
the event's creation. The default value is
SYSTEM.
This column was added in MySQL 5.1.17.
Definer: The user account
()
which created the event.
username@hostname
Type: One of the two values
ONE TIME (transient) or
RECURRING.
Execute At: The date and time when a
transient event is set to execute. Shown as a
DATETIME value.
For a recurring event, the value of this column is always
NULL.
Interval Value: For a recurring event,
the number of intervals to wait between event executions.
For a transient event, the value of this column is always
NULL.
Interval Field: 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
NULL.
Starts: The start date and time for a
recurring event. This is displayed as a
DATETIME value, and is empty if no
start date and time are defined for the event. (Prior to
MySQL 5.1.8, it defaulted to '0000-00-00
00:00:00' in such cases.)
For a transient event, the value of this column is always
NULL.
Ends: The end date and time for a
recurring event. This is displayed as a
DATETIME value, and defaults to
'0000-00-00 00:00:00' if no end date
and time is defined for the event.
For a transient event, the value of this column is always
NULL.
Status: The event status. One of
ENABLED or DISABLED.
Note that the action statement is not shown in the output of
SHOW EVENTS.
Note: The values displayed
for Starts and Ends
(other than '0000-00-00 00:00:00') are
currently shown using Universal Time. However, the
use of Universal Time in this context is expected to change,
so you should not rely upon it in your applications
(Bug#16420). See also Section 22.20, “The INFORMATION_SCHEMA EVENTS Table”.
To see events for a different schema, you can use the
FROM clause. For example, if the
test schema had been selected in the
preceding example, you could view events defined on
myschema using the following statement:
SHOW EVENTS FROM myschema;
You can filter the list returned by this statement on the
event name using LIKE plus a pattern.
This statement was added in MySQL 5.1.6.
See also Section 22.20, “The INFORMATION_SCHEMA EVENTS Table”.
Note: In MySQL 5.1.11 and
earlier, SHOW EVENTS displayed only those
events for which the current user was the definer, and the
SHOW FULL EVENTS statement was used for
viewing events defined by all users on a given schema.
SHOW FULL EVENTS was removed in MySQL
5.1.12.

User Comments
Add your own comment.