【数据库-MySql】开启事件 event_scheduler

时间:2020-12-25 15:18:24

【数据库-MySql】开启事件 event_scheduler


  1. Navicat Premium
  2. 事件计划已关闭。事件只能在服务器启动并开启事件计划时才能处理。

【数据库-MySql】开启事件 event_scheduler


  1. Navicat for MySQL
  2. The event_scheduler is Off. Events can be processed only when server is started with event_scheduler on

第一步、查看事件是否开启

SHOW VARIABLES LIKE 'event_scheduler';

第二步、开启事件


  1. SET GLOBAL event_scheduler = ON;
  2. -- SET @@global.event_scheduler = ON;
  3. -- SET GLOBAL event_scheduler = 1;
  4. -- SET @@global.event_scheduler = 1;

关闭事件相关命令


  1. SET GLOBAL event_scheduler = OFF;
  2. -- SET @@global.event_scheduler = OFF;
  3. -- SET GLOBAL event_scheduler = 0;
  4. -- SET @@global.event_scheduler = 0;

第三步、my.ini最后添加并保存

event_scheduler = 1

第四步、重启MySQL服务

原文:https://blog.csdn.net/chenlu5201314/article/details/80017040