So, I have some kind of records in my database that should be deleted after 24 hours. How do I make my MySQL database to update itself? Is this even possible? Thanks
0 0 * * * mysql -u USER -pPASSWORD -h HOST DATABASE < path/to/sql/script
You can write cron jobs for that.
In linux you can use crontab for that documentation
On Windows you can set cron jobs like this
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.