0

In mongodb with mongoose we can remove data automatically like this:
expiresAt:{
type: Date,
default: Date.now(),
index: {
expireAfterSeconds: 500,
},
},

But in mysql I cant find any solution for this. Please help.

FatFatty
  • 76
  • 1
  • 13

1 Answers1

0

you can use the Event Scheduler to start a query every secs,mins,.... if

you have a timestamp

see: https://dev.mysql.com/doc/refman/5.7/en/event-scheduler.html

Bernd Buffen
  • 14,525
  • 2
  • 24
  • 39