Mysql Event Not Working

前端 未结 9 1793
-上瘾入骨i
-上瘾入骨i 2021-01-30 10:46

I have added the following simple test event on my mysql database via phpmyadmin:

CREATE DEFINER=`root`@`localhost` EVENT `my_event` 
ON SCHEDULE EVERY 1 MINUTE          


        
9条回答
  •  -上瘾入骨i
    2021-01-30 10:58

    I just figured out that on MariaDB, after adding an event (in my case, it was the first one), you have to restart the event-scheduler

     SET GLOBAL event_scheduler = OFF;
    

    and then

     SET GLOBAL event_scheduler = ON;
    

    to make it actually bring the scheduler into "waiting for activation"-state.

提交回复
热议问题