What Is Binary Log File

Q

What Is Binary Log File? - MySQL FAQs - Server Daemon mysqld Administration

✍: FYIcenter.com

A

MySQL server binary log file plays an important role in restoring database changes to the server. Main features on binary log files are:

  • Binary logs can be turned on by "--log-bin=fileBaseName" option on "mysqld".
  • Binary logs only records statements that are changing data in the database. So a simple SELECT statement will be not recorded in binary logs.
  • Binary logs are organized in multiple files with names like: base.index, base.000001, base.000002, etc. Each time when you restart the server, a new binary log file will be created.
  • Binary log files can be viewed by "mysqlbinlog" program.
  • Binary log files can be piped into back to the server as "mysqlbinlog base.000001 | mysql" for restoring data changes after a server crash.

2007-05-11, 4739👍, 0💬