huzjworking
圣光狮子王
2019-01-10 09:36

mysql 多源复制 ,多库多表合到一个库

  • mysql

mysql 多源复制 ,多库多表合到一个库,库名无法重新修改,配置文件如下:
【slave】

[mysqld]
user=mysql
character-set-server=utf8mb4
default_authentication_plugin=mysql_native_password

server_id=1006

replicate-ignore-db = mysql
replicate-ignore-db = information_schema
replicate-ignore-db = performance_schema
replicate-ignore-db = sys

#read_only=1

replicate-do-db=mass

replicate-rewrite-db=zdbtest->mass

relay-log =mysqld-relay-bin
log-slave-updates = ON

slave-parallel-type=LOGICAL_CLOCK

relay_log_recovery=ON

slave_net_timeout = 30
slave_parallel_workers = 16

#slave-skip-errors = all
#slave-skip-errors = 1062,1053,1146,1213,1264,1205,1396


sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


master_info_repository=TABLE
relay_log_info_repository=TABLE

gtid-mode=on
enforce-gtid-consistency=true

plugin-load=rpl_semi_sync_slave=semisync_slave.so
rpl_semi_sync_slave_enabled=1

[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4

[master]

[mysqld]
user=mysql
character-set-server=utf8mb4
default_authentication_plugin=mysql_native_password

server-id=1003

log-bin=mysql-bin

binlog-format=MIXED

binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
binlog-ignore-db=sys

sync_binlog=1
auto_increment_increment=2
auto_increment_offset=1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

gtid-mode=on
enforce-gtid-consistency=true

master_info_repository=TABLE
relay_log_info_repository=TABLE

plugin-load=rpl_semi_sync_master=semisync_master.so
rpl_semi_sync_master_enabled=1


##
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4

帮忙看看有什么问题没有???

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答

为你推荐

换一换