mysql-event

Can I set a MySQL event schedule using phpMyAdmin?

一个人想着一个人 提交于 2019-11-27 01:10:22
问题 I want to increment a field on the first minute of every day, and then once it hits a certain value, set the value to 1. I would like to do this directly in MySQL, but preferably through phpMyAdmin. I am aware of the Event Scheduler, and so I'm looking for a way to use and manage it through phpMyAdmin. Is this possible? 回答1: It is.. Just issue appropriate CREATE EVENT SQL from SQL box. However: your MySQL server needs to have event scheduler enabled AND have EVENT privileges for the database

Cronjob or MySQL event?

帅比萌擦擦* 提交于 2019-11-26 22:32:29
I have to update my MySQL database every hour, and I was wondering what the advantages/disadvantages of using a cronjob VS a MySQL event? For example, which is faster? Which is safer? Thanks! I would always go a cron job, because: That's where sysadmins will expect it to be (this point is not to be underestimated) crobtab is bullet-proof, time-tested, extremely widely used and understood You can freely direct/analyse error/success messages where you want Some database tasks require/prefer mysql to be off-line (eg full backup), so you've got to use cron for those - it's a bad idea to have some