- 永久解决方法:
- 修改MySQL配置文件,设置event_scheduler=ON
- vi /etc/my.cnf
- 在[mysqld]下添加一行
- 重启mysql服务
event_scheduler=ON
- 临时方法
执行mysql 语句
1、查看事件调度器状态
show VARIABLES like'event_scheduler'
2、开启事件调度器
set GLOBAL event_scheduler=on
BEGIN delete from t_navigation_device_status_log where create_time<curdate()-interval 3 month; delete from t_navigation_device_status where create_time<curdate()-interval 3 month; END