First query the status of scheduled events in sql: SHOW VARIABLES LIKE 'event_scheduler'
If it returns off, it means that it is currently closed, and if it is on, the scheduled task is currently enabled.
Find the my.ini file in the directory of the mysql program and add an item: event_scheduler = 1
After saving, restart the mysql service. The restart service can be found in the service management.
It can also be done with a script:
mysql event_scheduler
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, turn off the event_scheduler directive:
SET GLOBAL event_scheduler = OFF;
SET @@global.event_scheduler = OFF;
SET GLOBAL event_scheduler = 0;
SET @@global.event_scheduler = 0;