create event eventResetMsgNum  
on schedule 
EVERY 1 day  
STARTS '2019-6-12 23:06:00'  
do call resetMsgNum();
-- mysql想利用定时器必须把mysql的定时器给开启了:
SET GLOBAL event_scheduler = 1;  -- 启动定时器
SET GLOBAL event_scheduler = 0;  -- 停止定时器
-- 还要开启事件:
ALTER EVENT eventResetMsgNum ON  COMPLETION PRESERVE ENABLE;   -- 开启事件
ALTER EVENT eventResetMsgNum ON  COMPLETION PRESERVE DISABLE;  -- 关闭事件