According to the MySQL documentation, to enable the event scheduler permanently I have to insert the following line in the my.ini (there is no my.cnf file in the mysql folder in XAMPP) somewhere in the [mysqld] section:
event_scheduler=ON
But this doesn't seem to work. Every time I restart the computer, the event scheduler is set to OFF, and I have to set it to ON manually (using the SET GLOBAL event_scheduler = ON;
command).
Does anybody know a solution for this? Thanks :)
Here the path for my.ini on XAMPP
xampp\mysql\bin\my.ini
Open my.ini and add the following
[mysqld]
event_scheduler=ON
then restart mySql service.
To check the status use the below mySql query
SELECT @@event_scheduler
The "event_scheduler" with the underscore is the variable name of this option, to turn on the event scheduler in the config file you have to use the correct format with a dash:
event-scheduler=ON
This is a bit confusing as both dash and underscore are used in options in the config file. You should use the server system variables reference when you want to figure out the proper syntax:
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_event_scheduler
Also, make sure that the option in the configuration file is defined under the [mysqld] header, and not under [client] or [mysqld_safe], because it's not picked up from those places.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With