MySQL 5.7 Open Binary log (Binlog) and considerations

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.