DELIMITER $$
ALTER DEFINER=root
@localhost
EVENT event_minute
ON SCHEDULE EVERY 1 MINUTE STARTS ‘2018-06-20 20:00:00’ ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
INSERT INTO ols_spell (orderEndTime) VALUES (NOW());
END$$
DELIMITER ;
########################
打开与关闭事件。
SET GLOBAL event_scheduler = on;
SET GLOBAL event_scheduler = off;