Configuration statements for Database Synchronization on multiple MySql servers

Source: Internet
Author: User

How can I configure Database Synchronization for multiple MySql servers? The following statements are used to synchronize databases on multiple MySql servers for your reference.

Description of configuration statements for synchronizing databases on multiple MySql servers (basic knowledge ):
# Server ID. the ID of each server cannot be set to the same number.
Server-id = 1

# Enable slave database logs for chained Replication
Log-slave-updates

# Whether the slave database is read-only. 0 indicates read/write, and 1 indicates read-only.
Read-only = 1

# Copy only a table
Replicate-do-table = tablename

# Copy only some available table matching characters)
Replicate-wild-do-table = tablename %

# Only copy a database
Replicate-do-db = dbname

# Copy only some databases
Replicte-wild-do-db = dbname %

# Do not copy a table
Replicate-ignore-table = tablename

# Do not copy some tables
Replicate-wild-ignore-table = tablename %

# Do not copy a database
Replicate-ignore-db = dbname

# Ignore when an error occurs. If this is not added, the synchronization process will terminate if any error occurs.
Slave-skip-errors = all

Sync_binlog = 1

# Whether the copied SQL statement is cleared immediately from the relay log. 1 indicates clearing immediately
Relay-log-purge = 1

# Slave server host, used to generate slave database list for show slave hosts
Report-host = hostname

# Master server host address and port used to connect from the slave server to the master server
Master-host = hostname
Master-port = 3306

# Master server database username and password (please grant copy permission (slave ))
Master-user = dbuser
Master-password = password

# Default Retry Interval
Master-connect-retry = 60

# Enable database logs
Log-bin = mysql-bin.log

# Name of the database to be synchronized
Binlog-do-db = dbname

# Name of the database to be synchronized
Binlog-ignore-db = dbname
 

Obtain the MySql time function of the current time

Mysql Aggregate functions

MySQL string case-sensitive Conversion Function

Use of MySQL concat Functions

Implementation of MySql remote connection

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.