How to make Create event in MYSQL?

1

I'm now learning about the create event in mysql

I am creating a simple test event, but it is not working, it appears in Events, but the table is not updated:

CREATE EVENT teste
    ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 10 SECOND
    DO
      UPDATE euk_teste SET status=2 WHERE id_produto=1;

Is there anything missing? Do I need to enable something?

    
asked by anonymous 03.05.2018 / 17:04

1 answer

0

The syntax is correct. The scheduling service is likely to be stopped.

Query to check service status:

SELECT @@EVENT_SCHEDULER;

Activating service:

SET GLOBAL event_scheduler = ON;
    
24.05.2018 / 03:51