以前也整理过多次,但不便于查找,今重点对Event的执行记录查询进行整理记录;
1.查看是否开启事件调度器:
[方式一]
SELECT @@event_scheduler;
[方式二]
SHOW VARIABLES LIKE 'event_scheduler'; #没有开启则无法启用定时器(0代表:off,1代表:on)
#若未开启则执行
SET GLOBAL event_scheduler = ON; #开启定时器
2.查询所有Event列表
[方式一]
show events; show full events;
[方式二](根据Event名称进行查询)
show create event liangxin_cfl_engine_e;
3.查询执行记录
[方式一]
select * from information_schema.events;
[方式二]
select * from mysql.event;