Mysql 事件调度器

10. January 2017 DataBase 0

第一步查看调度器状态

show variables like '%scheduler%'

若为开启,执行set global event_scheduler=1开启

第二步 创建事件调度器

create event myevent
on schedule every 10 second
do
insert into lijian.user(name,age) values(‘111’,222);

最后

show events 查看事件调度器
select * from user; 查看执行结果
drop event lijian.test1 删除事件调度器
alter event myevent disable; 禁用事件调度器


Leave a Reply

Your email address will not be published. Required fields are marked *