1
votes

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

2

2 Answers

1
votes

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)
0
votes

You can also use

select @@event_scheduler;

to show the status.