3

嗨,我将此事件存储在信息模式的事件表中:

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 的表的值日?

4

1 回答 1

14

这些事件由一个特殊的事件调度线程执行;并且很有可能没有启动事件调度程序线程。使用此查询检查它 -

SELECT @@global.event_scheduler;

结果应该是 - ON。否则,执行此查询以启动事件调度程序 -

SET @@global.event_scheduler = 1;

事件调度程序配置

于 2012-12-03T08:20:41.283 回答