码迷,mamicode.com
首页 > 数据库 > 详细

MySQL Replication主主复制—(实例)

时间:2016-03-18 18:13:27      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:mysql

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

原文地址:http://7424593.blog.51cto.com/7414593/1752507

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!