Get the App
SLTechnology News&Howtos  ›  Database  › 

MySQL master-slave replication specifies how different database tables implement synchronization parameters.

Shulou Source: shulou.com Published: 2022-06-01 19:07:25 11月23日 Update

This article mainly introduces MySQL master-slave replication to specify different database tables how to achieve synchronization parameters, the contents of the article are carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand the MySQL master-slave replication to specify different database tables how to achieve synchronization parameters.

Reduce the amount of binlog data in replication by the following parameters

Master side:

-- binlog-do-db binary logging database (multiple databases are separated by commas)

-- ignore databases in binlog-ignore-db binary logs (multiple databases are separated by commas)

The following is an example of a method in which the mysql master and slave ignores the authorization table:

In master:

Binlog-do-db=YYY requires synchronized databases. Not adding this line means synchronizing all

Binlog-ignore-db = mysql this is not recording binlog to achieve the slave library out of sync with the mysql library to ensure their respective permissions

Binlog-ignore-db = performance_schema

Binlog-ignore-db = information_schema

Slave end

-- replication-do-db sets the database to be replicated (multiple databases are separated by commas)

-- replication-ignore-db sets the replication databases to be ignored (multiple databases are separated by commas)

-- replication-do-table sets the table to be copied

-- replication-ignore-table sets replication tables to be ignored

-- replication-wild-do-table has the same function as replication-do-table, but can use wildcards

-- replication-wild-ignore-table has the same function as replication-ignore-table, but wildcards can be added

After reading the above about MySQL master-slave replication how to specify different database tables to achieve synchronization parameters, many readers must have some understanding, if you need to get more industry knowledge and information, you can continue to follow our industry information column.

Tags: Data database synchronization master-slave parameters commas different binary function log author industry wildcard information content meaning articles methods more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Technology Redmi Docker Apple