MySQL Database Table Data Purge/Removal Using MySQL Event Scheduler

In this article, let's look at

  1. Deleting table data in batches/chunks
  2. Logging each iteration
  3. Handling and logging errors
  4. Creating a recurring event to cleanup/purge table data regularly

Recently, I was working on creating a utility to purge the table data of MySQL Database. In this post, I will be sharing my experience of how we can create a recurring event in MySQL to purge/remove the table data.