Zabbix历史数据清理

使用truncate命令直接清空数据库,注意:清理数据属于高危操作,请在测试环境中验证后再执行线上操作!!!

truncate table history;
truncate table history_uint;
truncate table history_str;
truncate table history_text;
truncate table trends;
truncate table trends_uint;
truncate table events;

如何出现下面的报错,执行下面的命令:

SET foreign_key_checks=0;
truncate table events;
SET foreign_key_checks=1;
posted @ 2023-04-18 15:18  Alex010  阅读(164)  评论(0)    收藏  举报