Pregunta

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

¿Fue útil?

Solución

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)

Otros consejos

You can also use

select @@event_scheduler;

to show the status.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top