¿Cómo configurar global event scheduler = ON incluso si MySQL se reinicia?
Quiero establecer el event_scheduler
global a ON
incluso si MySQL se reinicia; ¿cómo puedo lograr esto?
SET GLOBAL event_scheduler = ON;
6 answers
Una forma - Usted puede establecer las variables del sistema y utilizar esas variables si hay alguna posibilidad de reiniciar su mysql.
Aquí está link Usando variables de sistema en mysql
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-11-21 05:05:11
Puede establecer
event_scheduler=ON
En el archivo my.ini
o my.cnf
, reinicie su servidor para que la configuración surta efecto.
Una vez configurado event_scheduler
siempre permanecerá ON
sin importar si su servidor se reinicia.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-30 12:06:17
Abra su /etc/mysql/my.ini archivo y añadir:
event_scheduler = on
En la sección [mysqld]
(probado bajo mysql 5.5.35-0 + wheezy1-Debian)
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-05-28 14:18:48
En nuestro sistema Windows Server 2012, ninguna de estas ni ninguna otra solución funcionó. Luego miré la entrada del registro para la puesta en marcha:
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56
El truco, el mal, es ProgramData
. No es Program Files
. Mira en los archivos de programa y verás un archivo my-default.ini
, puesto allí solo para arruinarte.
El truco es encontrar el camino en el registro, que era para mí: HKEY_LOCAL_MACHINE\SYSTEM\Services\MySQL56
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-04-21 18:09:47
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Agregue esta línea al final del archivo:
event_scheduler=ON
Que reiniciar y comprobar si daemon se inicia después de reiniciar:
Inicie sesión en mysql bash:
mysql -u <user> -p
Luego ejecute el comando:
SHOW PROCESSLIST;
Ahora debería ver el demonio event scheduler en la lista
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-06-13 06:36:29
También puedes usar
SET GLOBAL event_scheduler = 1;
Luego reinicie su servidor para que la configuración surta efecto.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-08 06:31:25