문제

I've created the following event, but for some reason it's not getting triggered:

CREATE EVENT Del_logs
ON SCHEDULE EVERY 1 HOUR
DO
    TRUNCATE TABLE security.errors;

Is there any log I could check to see what went wrong?

도움이 되었습니까?

해결책

It looks like the event scheduler is OFF.

  • use SHOW PROCESSLIST to check if the event scheduler is enabled. If it's ON you should see a process "Daemon" by user "event_scheduler".
  • use

    SET GLOBAL event_scheduler = ON;
    

    to enable the scheduler if it's currently not enabled.

  • More on configuring event scheduler read here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top