MySQL server enable event_ scheduler


First, query the status of plan events in SQL: Show variables like ‘event_ scheduler’
If off is returned, it means that the current status is closed. If on, the planned task has been opened.
Find the my.ini file in the MySQL program directory and add an item: event_ scheduler = 1
After saving, restart the MySQL service, which can be found in service management

It can also be realized by foot book:
mysql event_scheduler
Open event_ Scheduler SQL instruction:
SET GLOBAL event_scheduler = ON;
SET @@global.event_scheduler = ON;
SET GLOBAL event_scheduler = 1;
SET @@global.event_scheduler = 1;
Instead, close event_ Scheduler instruction:

SET GLOBAL event_scheduler = OFF;
SET @@global.event_scheduler = OFF;
SET GLOBAL event_scheduler = 0;
SET @@global.event_scheduler = 0;

This work adoptsCC agreement, reprint must indicate the author and the link to this article