Search code examples
mysqlperconamysqlbinlog

Delete log-bin files when log_bin is OFF


I have a lot of mysql-bin files on server (mysql-bin.0001, mysql-bin.0002…) that occupy many space. On my server (MySQL 5.5 Percona) log_bin option is OFF.

Is it save to delete log files from log-bin directory?


Solution

  • When you don't need them anymore, then yes, it's safe to delete them. Having log_bin set to OFF means, that the binary log is disabled and that nothing new gets written to these files (nor are more files like this created).

    When you don't know, what the binary log is for, you might want to read up about it. It's used primarily for replication (the master needs to have this enabled) and certain backup techniques.