Buat Acara:
drop event if exists `myevent21222`;
DELIMITER |
CREATE EVENT myevent21222
ON SCHEDULE EVERY 5 MINUTE STARTS '2016-01-01 00:00:00'
ON COMPLETION PRESERVE
DO
BEGIN
UPDATE `team` SET `reg` = '0' WHERE `id` = '1';
END |
# MySQL lieferte ein leeres Resultat zurück (d.h. null Datensätze).
DELIMITER ;
Aktifkan pengendali acara:
SET GLOBAL event_scheduler = ON; -- turn her on and confirm below
Konfirmasi aktif:
show variables where variable_name='event_scheduler';
Lihat info acara:
show events from so_gibberish2; -- note so_gibberish2 is my database name
-- jelas gunakan nama database Anda di atas
Lihat halaman manual untuk mengetahui apa PADA PERAWATAN PENYELESAIAN artinya serta hal-hal lain.
Nonaktifkan atau aktifkan:
ALTER EVENT myevent21222 disable;
ALTER EVENT myevent21222 enable;