Question

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

Was it helpful?

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)

OTHER TIPS

You can also use

select @@event_scheduler;

to show the status.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top