How to configure Mysql¶
- An archiving solution for requests has been set up using trigger and event scheduler
- About Trigger
A trigger is used to archive requests into 'archived_jrequests' table. It is scheduled on update
Once the trigger is defined, it is persistent. There is nothing else to do.
To show triggers :
SHOW TRIGGERS \G
- About Event scheduler
Event scheduler is used to clean jrequests and jqueues tables. Actions are fired each minutes
To show event scheduler :
SHOW VARIABLES LIKE '%event%'; SHOW status LIKE '%event%'; SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME like 'cleaning_%' \G SHOW EVENTS\G
Per default event scheduler is disabled, to activate it uses : SET GLOBAL event_scheduler = ON;
To activate it in a permanent way, set this parameter in my.cnf (event_scheduler=ON)
[mysqld] ... event_scheduler=ON ...
- Advanced config.
In my opinion, a detailed config file (my.cnf) would be preferable (forthcoming ? perhaps ?)