Several important startup options for MySQL master-slave Replication

Source: Internet
Author: User

MySQL master-slave replication several important startup options (1) log-slave-updateslog-slave-updates this parameter is used to configure whether to write updates from the server to binary logs, this option is disabled by default. However, if the slave server B is the slave server of server A and serves as the master server of server C, you need to develop this option, in this way, the slave server C can obtain its binary log for synchronization (2) the master-connect-retry parameter is used to set the retry Interval when the connection to the master server is lost. The default value is 60 seconds (3) read-only is used to restrict normal users from updating the slave database to ensure the security of the slave database, however, if a Super User is still able to update the slave database (4) slave-skip-errors during the replication process, due to various reasons, the slave server may encounter an error in executing the SQL statement in the BINLOG. If this happens, the server stops the replication process and does not synchronize the process. Slave-skip-errors is used to define the error numbers that can be automatically skipped from the server during the replication process. When a defined error number is encountered during the replication process, it can be automatically skipped, directly execute the following SQL statement. -- Slave-skip-errors = [err1, err2 ,....... | ALL] However, it must be noted that if this parameter is enabled, improper processing may result in data synchronization between the master and slave databases. In the application, it is necessary to set this parameter based on the actual situation, if you do not have strict requirements on data integrity, this option can indeed reduce maintenance costs.

Related Article

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.