charanraj charanraj -5 years ago 164
MySQL Question

how to permanently activate/set the global event_scheduler to 1 in mysql

I have added a event to my mySQL db and it works fine, but the thing that is bothering me is that every now and then I have to set the mysql global variable to 1 so that my event is active.I log in as root user and have complete privileges (I use it for practice purpose)

Every time I log in to my mysql server I have to execute the following line

__set global event_scheduler=1__

can I set the event_scheduler variable permanently to 1?
I'm using mysql 5.1.50 - community

Answer Source

Yes, write event_scheduler=on somewhere under the [mysqld] section in the default mysql config file, usually /etc/my.cnf

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download