How to turn on MySQL scheduled events(2012-07-26 12:21:23)
reproduced
Tags: mysql event planning it |
Category: MySQL |
First, query the status of the scheduled event in sql: SHOW VARIABLES like ' Event_scheduler '
If the return is off, the current is off, and if it is on, the scheduled task is currently turned on.
Locate the My.ini file in the MySQL program directory and add an entry: Event_scheduler = 1
After saving, restart the MySQL service, restart the service can be found in the service management
can also be implemented with a script:
MySQL Event_scheduler
To open the Event_scheduler SQL command:
SET GLOBAL event_scheduler = on;
SET @ @global. Event_scheduler = on;
SET GLOBAL event_scheduler = 1;
SET @ @global. Event_scheduler = 1;
Instead, close the Event_scheduler command:
SET GLOBAL event_scheduler = OFF;
SET @ @global. Event_scheduler = OFF;
SET GLOBAL event_scheduler = 0;
SET @ @global. Event_scheduler = 0;
How to turn on MySQL scheduled events