Created
February 5, 2021 09:01
-
-
Save sysadminbp/7de8e6fa1d2248ba203ca6f7a3c46531 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First of all you need two identical mysql versions of mysql, example: 5.7.2 and 5.7.32. 5.7.X with not-5.7.x WILL WORK ONE SIDE ONLY! | |
| =========================== | |
| ====Master==== | |
| [mysqld] | |
| server_id = 1 | |
| binlog-do-db = databasename | |
| replicate-do-db = databasename | |
| binlog_checksum = NONE | |
| log_bin = /var/log/mysql/mysql-bin.log | |
| log_bin_index = /var/log/mysql/mysql-bin.log.index | |
| expire_logs_days = 10 | |
| max_binlog_size = 1000M | |
| ====Slave==== | |
| [mysqld] | |
| server_id = 2 | |
| master-info-file = /var/log/mysql/mysql-master.info | |
| log-error = /var/log/mysql/mysql.err | |
| log_bin = /var/log/mysql/mysql-bin.log | |
| log_bin_index = /var/log/mysql/mysql-bin.log.index | |
| relay_log = /var/log/mysql/mysql-relay-bin.log | |
| relay_log_index = /var/log/mysql/mysql-relay-bin.index | |
| relay-log-info-file = /var/log/mysql/mysql-relay-log.info | |
| expire_logs_days = 10 | |
| max_binlog_size = 1000M | |
| # Replicates to mydatabase | |
| #replicate_rewrite_db=databasename->mydatabase | |
| replicate-do-table=mydatabase.table1 | |
| replicate-do-table=mydatabase.table2 | |
| replicate-do-table=mydatabase.table6 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment