MySQL Forums
Forum List  »  Newbie

Re: Deleting bin files
Posted by: Barry Galbraith
Date: February 09, 2022 02:01AM

It should be safe to delete some (most!) of them.
They are binary log files, which log changes made to your database. They can be used, along with a mysqldump file to restore your database to a particular point in time.
To do a restore, you will need a mysqldump, and all of the binlog files since the dump was taken.
The question then becomes, how far back you might need to go? Only you can answer that.
Any binlog files prior to that time can be deleted.
How far back do you regular mysqldump files go? Any binlog older than than your oldest mysqldump are useless and can be deleted.
Going forward, you can set expire_logs_days in my.ini to a suitable number of days (for you) and your system will automatically delete expired files.
Expired binlog files are those older than your oldest mysqldump backup.
https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_expire_logs_days

BTW, your MySQL 5.5 is outdated.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
February 08, 2022 10:51PM
Re: Deleting bin files
February 09, 2022 02:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.