MySQL – Information_schema Events – How persistent or retention is managed

auditMySQLmysql-event

I'm a MS SQL guy and understand agent job history.

I'm now working with MySQL.

I've searched hi and low but I can't find any solid info on how event data within information_schema.events is persisted, retained for.

I plan to setup some MySQL Events but need to understand how reliable the logs are.

I don't think we have anything in our my.cnf with regards to retention periods of information_schema.

If it's forever – should I try and clean this up with some house-keeping job?

I am making events to fire once a week. Ideally these would be retained for 180 days.
Events that fire more regularly every 5 minutes, perhaps should only be retained for a month.

how do I extend this/ manage this – do people log to a separate table that you can manage yourself?

Best Answer

In MySQL, an "event" is not a periodic data element. It's more like a cron job (sorry— an "at" job in Windows). It's a routine of code with a schedule.

The content of information_schema.events is metadata about the schedule job. For instance, the code body, the schedule, etc. This information should be unchanging no matter how many times you the event runs.

It does not store any history of executions of that job, nor results or data produced by that job.