Search code examples
mysqlsqlschedulermysql-eventmysql-routines

get Mysql Event status


I can get event in mysql by

SHOW EVENTS LIKE 'e29'

but it is giving all information. it is like

select * from ....

My need is that i want to get the STATUS of a particular event


Solution

  • Show events is not a regular statement that returns a cursor to read on.

    You have to query information_schema.events to know status of an event.

    mysql> select event_name, status -- from events where event_name =
        -> from information_schema.events where event_name = 'event_scheduling_sample';
    +-------------------------+---------+
    | event_name              | status  |
    +-------------------------+---------+
    | event_scheduling_sample | ENABLED |
    +-------------------------+---------+
    1 row in set (0.01 sec)