MySQL 清理slowlog方法
SET GLOBAL slow_query_log = ‘OFF‘; ALTER TABLE mysql.slow_log RENAME mysql.slow_log_drop; CREATE TABLE mysql.slow_log LIKE mysql.slow_log_drop; SET GLOBAL slow_query_log = ‘ON‘; DROP TABLE mysql.slow_log_drop;
2022-10-09 08:23:32
MySQL 清理slowlog方法
SET GLOBAL slow_query_log = ‘OFF‘; ALTER TABLE mysql.slow_log RENAME mysql.slow_log_drop; CREATE TABLE mysql.slow_log LIKE mysql.slow_log_drop; SET GLOBAL slow_query_log = ‘ON‘; DROP TABLE mysql.slow_log_drop;