Event Not Working in MySQL - Check ’select @@event_scheduler’
In MySQL I entertain tried an Event for the following pr
CREATE TABLE `myevent` (
`id` INTEGER(11) Lapse NULL )ENGINE=InnoDB
Capacity fitting SET ‘latin1′ COLLATE ‘latin1_swedish_ci’;
Then I created actuality with the following set of Commands :
Engender EVENT `new_event`
ON SCHEDULE EVERY 1 Blemished STARTS ‘2008-07-03 17:29:53′
ON COMPLETION NOT PRESERVE
Assent to
COMMENT ” DO
insert into myevent values (2);
I Compiled the Circumstance . But Nothing has happened to my table.
Then I checked the Pre-eminence of Event Scheduler using the following Regulation
Select @@event_scheduler;
The Eminence it was OFF
Now I understood the reason for not working because the occurrence schduler is not started.
To change the prominence of event scheduler I used the following enjoin.
SET GLOBAL event_scheduler = 1; Now I Checked the when it happened It started Working.