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-11-10 19:14:17
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;