4

Is there a way to view the body of a MySQL event? The SQL part after the DO section? I can easily rename, enable, disable, even alter the schedule and the body separately, but exactly viewing what my event is doing, seems arduous to achieve.

The closest thing I've found was using the recreate command SHOW CREATE EVENT event_name, like explained here on the official MySQL site.

Is there another command or trick to retrieve the body of a MySQL event?

5

Running the following command retrieves the body of a mysql event:

SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_name'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.