Home > Database > Mysql Tutorial > Mysql事件查看及定时器相关操作_MySQL

Mysql事件查看及定时器相关操作_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:35:02
Original
1127 people have browsed it

bitsCN.com

Mysql事件查看及定时器相关操作

 

查看事件

SHOW EVENTS

select * from mysql.event

 

查看是否开启定时器

SHOW VARIABLES LIKE 'event_scheduler';

开启定时器 0:off 1:on

SET GLOBAL event_scheduler = 1; .

删除

drop  EVENT *_event;

创建

CREATE EVENT IF NOT EXISTS *_event_test

ON SCHEDULE  every 1 Hour

DO CALL update_*_proc(); 

 

或者

CREATE EVENT IF NOT EXISTS update_*_event

ON SCHEDULE  every 1 DAY STARTS TIMESTAMP(CURRENT_DATE,'00:05:00')

ON COMPLETION PRESERVE ENABLE

DO CALL update_*_proc(); 

 

date_add(date(curdate() + 1),interval 8 hour) 

 

bitsCN.com
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template