MySQL Replication主主复制—(实例)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL Replication主主复制—(实例)相关的知识,希望对你有一定的参考价值。

Step1:主主节点/ect/my.cnf的配置

系统版本:CentOS-6.5-x86_64

##node1
[mysqld]
basedir=/usr/local/mysql
datadir=/var/lib/mysql
port=3306
socket=/var/lib/mysql/mysql.sock

server-id=1
log-bin=/data/mysql/binlog/mysql-bin
relay-log=/data/mysql/binlog/mysql-relay-bin
binlog-cache-size=10m
sync-binlog=1
expire_logs_days=30
replicate-wild-do-table=testdb1.%
replicate-wild-do-table=testdb2.%
##node2
[mysqld]
basedir=/usr/local/mysql
datadir=/var/lib/mysql
port=3306
socket=/var/lib/mysql/mysql.sock

server-id=2
log-bin=/data/mysql/binlog/mysql-bin
relay-log=/data/mysql/binlog/mysql-relay-bin
binlog-cache-size=10m
sync-binlog=1
expire_logs_days=30
replicate-wild-do-table=testdb1.%
replicate-wild-do-table=testdb2.%





以上是关于MySQL Replication主主复制—(实例)的主要内容,如果未能解决你的问题,请参考以下文章

MySQL Replication主从复制—(实例)

mysql数据库负载均衡高可用之主从主主备份,实时同步

centos7mysql5.6.30单机多实例配置主主复制

MySQL主从复制Replication

Mysql-MMM高可用群集

Mysql组复制无法添加实例