Binary log Statements Binary logs, we commonly known as Binlog, record database changes, often used in the master-slave replication environment and recovery
Backup.
Opening binlog is simple, CENTOS7 environment open MY.CNF configuration file, add
Server-id = [serial number]log-bin = [FileName]
5.7.3 later versions must be configured with Server-id, and the file name can be configured with an absolute path to enable Binlog.
Binlog configuration has a few special points, you need to pay attention to
1, if the file name is an absolute path, in this case, the index must be manually edited, that is, the MY.CNF configuration file is added
Log-bin-index = [FileName]
The index file name requires a Binlog file name. Index
So that the Binlog index and Binlog path are consistent. (in some older versions of MySQL, address inconsistency using Binlog for master-slave copy or restore will be error) (Bug #11745230 bug# 12133)
2, if you add Log_bin to the configuration file without the file name. Then to add a row of Binlog file name configuration, otherwise
will be the Binlog default address file name, which is the installation address/host name-bin
Log_binlog_bin_basename = [FileName]
3, in MySQL 5.7.3 and later version, if not set Server-id, then set binlog after the MySQL service cannot be opened. (Bug #11763963, bug #56739)
This article is from the "focus on drilling 100 years" blog, please be sure to keep this source http://titandeng.blog.51cto.com/823817/1863762
MySQL 5.7 Open Binary log (Binlog) and considerations