Question

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?

Was it helpful?

Solution

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

SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_name'
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top