MySQL tutorial: SHOW EVENTS [EN]
top of page
CerebroSQL

MySQL: 

SHOW EVENTS

Syntax:
SHOW EVENTS
[{FROM | IN} schema_name]
[LIKE 'pattern' | WHERE expr]

It requires the EVENT privilege for the database from which the events are
to be shown.

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: 1
Interval field: DAY
Starts: 2018-08-08 11:06:34
Ends: NULL
Status: ENABLED
Originator: 1
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
Database Collation: utf8mb4_0900_ai_ci

To see events for a specific schema, use the FROM clause. For example,
to see events for the test schema, use the following statement:

SHOW EVENTS FROM test;

The LIKE clause, if present, indicates which event names to match. The
WHERE clause can be given to select rows using more general conditions,
as discussed in

Example

bottom of page