create event test_event_schedule
on SCHEDULE every 20 SECOND
do INSERT INTO demo.a(`name`) VALUES (now()); -- 创建事件调度器 every 1 MINUTE 分钟 HOUR 小时
show VARIABLES like 'event_scheduler'; -- 查看调度器总开关
set GLOBAL event_scheduler = 1 ; -- 打开调度器总开关 1是开 0是关
alter event test_event_schedule DISABLE; -- 启用/禁用调度器 ENABLE/DISABLE
drop event test_event_schedule ; -- 删除调度器