Hello
i'm using nagios xi 5.8.1
my root partition is almost full
on investigation i have approx 30Gigs of mysql binary log files spanning back 1 month
i have tried to follow the document below
https://support.nagios.com/forum/viewto ... ry#p320510
but the file locations are out of date.
trying to find /etc/mycnf.d/ or the file i should be altering
quote from support forum link
The binlog_expire_logs_seconds can be decreased.
Edit the /etc/my.cnf.d/mysql-server.cnf file and add this line to the bottom.
binlog_expire_logs_seconds=86400
To purge the data, run this:
echo "PURGE BINARY LOGS BEFORE '2020-11-05 23:59:59';" |mysql -u root -pnagiosxi
thanks for any help given
richie
mysql binary files -- need to reduce 33G of binlog files
-
richie7tech
- Posts: 14
- Joined: Mon Sep 28, 2020 7:29 am
Re: mysql binary files -- need to reduce 33G of binlog files
Hello @richie7tech
Thanks for reaching out, sounds like you have done most of the leg work on this one. So to verify I jumped on my Test VM and ran through a search and found it here:
The results with the 'etc' path:
Perry
Thanks for reaching out, sounds like you have done most of the leg work on this one. So to verify I jumped on my Test VM and ran through a search and found it here:
Code: Select all
grep -Eir 'binlog_expire_logs_seconds' /etc/*Thanks,/etc/my.cnf.d/mysql-server.cnf:binlog_expire_logs_seconds=86400
Perry
-
richie7tech
- Posts: 14
- Joined: Mon Sep 28, 2020 7:29 am
Re: mysql binary files -- need to reduce 33G of binlog files
Many Thanks Perry
i'm using Ubuntu 20.04
using you're search command i found the location
/etc/mysql/mysql.conf.d/mysqld.cnf
and it was set to 2592000
now altered to 86400 = 1 day
again thanks
richie
i'm using Ubuntu 20.04
using you're search command i found the location
/etc/mysql/mysql.conf.d/mysqld.cnf
and it was set to 2592000
now altered to 86400 = 1 day
again thanks
richie
Re: mysql binary files -- need to reduce 33G of binlog files
Hello @richei7tech
Thanks for the follow-up, and will go ahead to lock this post.
Please let us know if you need anything further,
Perry
Thanks for the follow-up, and will go ahead to lock this post.
Please let us know if you need anything further,
Perry