0

I tried to start working with events today.

I wrote this : SHOW EVENTS FROM classicmodels;

And it only return : No Rows (Why? It should shows shomething)

Here is my sample event:

CREATE EVENT test_event_02
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
ON COMPLETION PRESERVE
DO
   INSERT INTO messages(message,created_at)
   VALUES('Test MySQL Event 2',NOW());

And my select :

SELECT * FROM messages;

id  message created_at
1   Test MySQL Event 1  2018-11-19 18:21:55
2   Test MySQL Event 2  2018-11-19 18:24:36
  • 1
    maybe they are in a different schema/database. Try `INSERT INTO messages(message,created_at) VALUES(DATABASE(),NOW());` in your `EVENT` and then look. – danblack Nov 20 '18 at 02:37
  • 1
    You could select * from information_schema.events where event_name = 'test_event_02' to find out which schema the event has been added to.' – P.Salmon Nov 20 '18 at 08:04

0 Answers0