Query below return all events scheduled in MySQL database with details.
Query
select event_schema as database_name,
event_name,
event_definition,
event_type,
concat(interval_value, ' ', interval_field) as 'interval',
case when event_type = 'RECURRING'
then starts
else execute_at end as execute_time,
ends,
status
from information_schema.events
-- where event_schema = 'your database name'
order by event_schema,
event_name;
Columns
- database_name - name of the database (schema) conaining event
- event_name - name of the event
- event_definition - definition of the event
- event_type:
- ONE TIME - event will fire only once
- RECURRING - event fires at defined interval
- interval - event schedule interval
- execute_time - when event will be launched first time
- ends - when event will stop. Null value means never.
- status:
- Disabled
- Enabled
Rows
- One row: represents one event
- Scope of rows: all events in database
- Ordered by event database, event name