mysql事件不起作用 [英] mysql event doesn't work
本文介绍了mysql事件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
event_catalog:def
event_schema :m4af
event_name:aggiornaGiorni
定义者:root @ localhost
时区:系统
event_body:sql
event_definition:更新m4af.utentibloccati设置giorni = giorni + 1
event_type:recurring
执行于:null
interval_value:1
interval_field:day
sql_mode:STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
开始:2012-11-26 11 :40:41
结束:null
状态:启用
on_completion:不保存
已创建:2012-11-26 11:40:41
last_altered:2012- 11-26 11:40:41
last_executed:2012-11-26 11:40:41
event_comment:
发件人: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;
Hi I have this event stored in the event table of the information schema:
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
Why this event does not increments the value day of my table named utentibloccati ?
解决方案
The events are executed by a special event scheduler thread; and it is very possible that event scheduler thread was not started. Check it using this query -
SELECT @@global.event_scheduler;
The result should be - ON
. Otherwise, execute this query to start event scheduler -
SET @@global.event_scheduler = 1;
Event Scheduler Configuration.
这篇关于mysql事件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文