How to set global event_scheduler=ON even if MySQL is restarted?

nakul picture nakul · Nov 21, 2013 · Viewed 89.3k times · Source

I want to set the event_scheduler global to ON even if MySQL is restarted; how can I achieve this?

SET GLOBAL event_scheduler = ON;

Answer

prem picture prem · May 6, 2014

You can set

event_scheduler=ON

in my.ini or my.cnf file, then restart your server for the setting to take effect.

Once set event_scheduler will always remain ON no matter whether your server restarts.