MySQL Binary Logs are Taking Up Huge Disk Space


Query
MySQL binary logs are taking up huge disk space

Open MySQL Configuration File /etc/mysql/my.cnf & Comment Following Lines
#log-bin=mysql-bin
#binlog_format=mixed

Limit Size Log Files in MySQL Configuration File /etc/mysql/my.cnf
expire_logs_days = 10
max_binlog_size  = 100M

Disk Space Use Below Command
mysql -u root -p”PASSWORD” -e “PURGE BINARY LOGS TO ‘mysql-bin.0000xx’;”

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s