Step1:主主节点/ect/my.cnf的配置
系统版本:CentOS-6.5-x86_64
##node1[mysqld]basedir=/usr/local/mysqldatadir=/var/lib/mysqlport=3306socket=/var/lib/mysql/mysql.sockserver-id=1log-bin=/data/mysql/binlog/mysql-binrelay-log=/data/mysql/binlog/mysql-relay-binbinlog-cache-size=10msync-binlog=1expire_logs_days=30replicate-wild-do-table=testdb1.%replicate-wild-do-table=testdb2.%
##node2[mysqld]basedir=/usr/local/mysqldatadir=/var/lib/mysqlport=3306socket=/var/lib/mysql/mysql.sockserver-id=2log-bin=/data/mysql/binlog/mysql-binrelay-log=/data/mysql/binlog/mysql-relay-binbinlog-cache-size=10msync-binlog=1expire_logs_days=30replicate-wild-do-table=testdb1.%replicate-wild-do-table=testdb2.%