检测事件是否开启
show variables like 'event_scheduler';
开启事件
set global event_scheduler = on;
创建一个存储过程
delimiter // create procedure test() begin update test fdCreate = now(); end;
创建一个事件
create event if not exists e_test on schedule every 30 second on completion preserve do call test();
关闭或开启执行事件
alter event event_name on completion preserve [enable | disable]
删除事件
drop event event_name;