# 1 创建存储过程 /* delimiter // create procedure test() begin update test SET name = date_format(now(),'%Y-%c-%d %h:%i:%s'); end; */ # 2 创建事件 调用存储过程 /* create event if not exists e_test on schedule every 30 second on completion preserve do call test(); */ # 查看事件 #SHOW EVENTS ; # 开启事件 # alter event e_test on completion preserve enable # 关闭事件 # alter event e_test on completion preserve disable # 调用存储过程 # CALL test();