您好我将此事件存储在信息架构的事件表中:
event_catalog:def
event_schema: m4af
event_name:aggiornaGiorni
definer:root@localhost
timezone:system
event_body:sql
event_definition:update m4af.utentibloccati set giorni=giorni+1
event_type:recurring
execute at: null
interval_value:1
interval_field:day
sql_mode:STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
starts:2012-11-26 11:40:41
ends:null
status:enabled
on_completion:not preserve
created:2012-11-26 11:40:41
last_altered:2012-11-26 11:40:41
last_executed:2012-11-26 11:40:41
event_comment: ""
originator:0
character_set_client:utf8
collocation_connection:utf8_general_ci
database_collation:utf8_general_ci
为什么此事件不会增加名为utentibloccati的表的值日?
答案 0 :(得分:11)
事件由特殊事件调度程序线程执行;并且很可能没有启动事件调度程序线程。使用此查询检查它 -
SELECT @@global.event_scheduler;
结果应为 - ON
。否则,执行此查询以启动事件调度程序 -
SET @@global.event_scheduler = 1;