当前位置:Gxlcms > mysql > MySQL计划任务(事件调度器)EventScheduler介绍_MySQL

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

时间:2021-07-01 10:21:17 帮助过:14人阅读

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;
来开启,也可以直接在启动命令加上“

人气教程排行