1、查看定时器evevt功能是否关闭
  show variables like 'event_scheduler'
  2、开启定时器
  SET GLOBAL event_scheduler = 1;
  或者:SET GLOBAL event_scheduler = 'no';
  3、创建一张测试表
  drop table if exists test;
  create table test
  (
  id int(11) not null auto_increment primary key,
  time datetime not null
  ) engine=innodb default charset=utf8;
  4、创建evevt定时器执行的存储过程
  delimiter //
  drop procedure if exists delete_resource_order_proce //
  create procedure delete_resource_order_proce()
  begin
  insert into test(time) values(now());
  end //
  delimiter;
  5、创建定时执行的事件
  drop event if exists delete_resource_order_event;
  create event delete_resource_order_event
  on schedule every 1 DAY STARTS '2016-07-06 00:00:00'
  on completion preserve disable
  do call delete_resource_order_proce();
  6、开启事件delete_resource_order_event
  alter event delete_resource_order_event on completion preserve enable;
  7、关闭事件delete_resource_order_event
  alter event delete_resource_order_event on completion preserve disable;