how to automatically expire mysql records after a fixed amount of time

the issue we have a database table containing usernames and passwords, but we want to make them temporary like expiring after a fixed number of days from the creation. This is typical usage for a wi-fi captive portal with RADIUS authentication backed on mysql. the idea we store a new field in the table with the timestamp, and run a periodic “cleaner” job that deletes record older than X days....

May 5, 2016 · Andrea Manzini