SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE telescope_entries_tags;
TRUNCATE TABLE telescope_monitoring;
TRUNCATE TABLE telescope_entries;
SET FOREIGN_KEY_CHECKS = 1;The following command will delete all logs prior to the log file mysql-bin.0002
PURGE BINARY LOGS TO 'mysql-bin.0003';The following command will delete all logs before 2024-12-25 12:30:00
PURGE BINARY LOGS BEFORE '2024-12-25 12:30:00';The following command will delete all logs till now.
PURGE BINARY LOGS BEFORE now();Adding the following lines to the MySQL configuration file will allow the MySQL server to automatically purge logs older than 14 days, saving you the trouble of doing it manually.
expire_logs_days = 14
max_binlog_size = 100M