The code for event_ts.sql is: DROP TABLE IF EXISTS `test`.`store_ts`; CREATE TABLE `test`.`store_ts` ( `id` INT NOT NULL AUTO_INCREMENT, `time` DATETIME NOT NULL, PRIMARY KEY (`id`)); DROP EVENT IF EXISTS e_store_ts; CREATE EVENT e_store_ts ON SCHEDULE EVERY 10 SECOND DO INSERT INTO test.store_ts (time) VALUES (NOW()); #ALTER EVENT e_store_ts DISABLE; #ALTER EVENT e_store_ts ENABLE;