数据库
首页 > 数据库> > mysql事件不起作用

mysql事件不起作用

作者:互联网

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

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

解决方法:

事件由特殊事件调度程序线程执行;并且很可能没有启动事件调度程序线程.使用此查询检查 –

SELECT @@global.event_scheduler;

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

SET @@global.event_scheduler = 1;

Event Scheduler Configuration.

标签:mysql,events,information-schema
来源: https://codeday.me/bug/20190716/1479865.html