Home >Database >Mysql Tutorial >MySQL计划任务(事件调度器) Event Scheduler介绍_MySQL

MySQL计划任务(事件调度器) Event Scheduler介绍_MySQL

WBOY
WBOYOriginal
2016-06-01 13:25:44895browse

bitsCN.com

要查看当前是否已开启事件调度器,可执行如下SQL:

SHOW VARIABLES LIKE 'event_scheduler';

SELECT @@event_scheduler;

SHOW PROCESSLIST;
若显示:

+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| event_scheduler | OFF   |
+-----------------+-------+
则可执行

SET GLOBAL event_scheduler = 1;

SET GLOBAL event_scheduler = ON;
来开启,也可以直接在启动命令加上“

Statement:
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