如下两台机器, 做一主一从复制:
- Master: 192.168.1.7
- Slave: 192.168.1.6
Master上的my.cnf:
log-bin=mysql-bin sync_binlog=1 innodb_support_xa=1 binlog_format=ROW server-id=7 innodb_flush_log_at_trx_commit=1 binlog-ignore-db=information_schema binlog-ignore-db=cluster binlog-ignore-db=mysql
Slave上的my.cnf:
log-bin=mysql-bin
sync_binlog=1
innodb_support_xa=1
binlog_format=ROW server-id=6 binlog-ignore-db=information_schema binlog-ignore-db=cluster binlog-ignore-db=mysql log-slave-updates slave-skip-errors=all slave-net-timeout=60