查看是否为binlog文件占用大量磁盘
df -Th
du -sh /var/lib/mysql/*
mysql -u root -p
show variables like '%log_bin%';
show binary logs;
手动清除binlog日志(存在主从的情况)
mysql -u root -p
purge master logs before '2022-03-01 00:00:00';
set global expire_logs_days = 7;
flush logs;
操作完成,先停服务,最后停mysql,启动时先启动mysql,在启动服务
systemctl stop zabbix-proxy
systemctl stop zabbix-agent
systemctl stop mysqld
systemctl start mysqld
systemctl start zabbix-agent
systemctl start zabbix-proxy
systemctl status mysqld
systemctl status zabbix-proxy
systemctl status zabbix-agent
df -Th
|