-- Execute the following SQL statement to turn on the event scheduler.
SET GLOBAL event_scheduler = ON;
--Create a custom event that rotates (flushes) the binary logs every 24 hours
DROP EVENT IF EXISTS rotate_binlog_24_hrs_event;
CREATE EVENT streamkap_rotate_binlog_24_hrs_event
ON SCHEDULE EVERY 24 hour
DO FLUSH BINARY LOGS;