What Is Binary Log File in MySQL

Q

What Is Binary Log File in MySQL?

✍: 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.

 

Server Daemon mysqld Administration in MySQL

⇒⇒MySQL Database Tutorials

2016-10-16, 169👍, 0💬