MySQL Event Planner in XAMPP

According to the MySQL documentation, to enable the event scheduler, I have to insert the following line into my.ini (the my.cnf file in the mysql folder in XAMPP ) somewhere in the [mysqld] section:

event_scheduler=ON 

But this does not seem to work. Each time I restart the computer, the event scheduler is set to OFF, and I must set it to the ON position manually (using the SET GLOBAL event_scheduler = ON; command).

Does anyone know a solution for this? Thanks:)

+6
source share
2 answers

underlined event_scheduler is the variable name of this parameter. To enable the event scheduler in the configuration file, you must use the correct format with a dash:

 event-scheduler=ON 

This is a bit confusing since both options and the underscore are used in the parameters in the configuration file. You must use the link to the server system variables if you want to determine the correct syntax:

http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_event_scheduler

Also, make sure that the parameter in the configuration file is defined in the [mysqld] header, and not in the [client] or [mysqld_safe], because it is not selected from these places.

+4
source

Here is 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 the mySql service.

To check the status, use the following query mySql

SELECT @@ event_scheduler

0
source

Source: https://habr.com/ru/post/899057/


All Articles