Professional Documents
Culture Documents
Master-Master Replication Mysql
Master-Master Replication Mysql
--------------------------[mysqld]
server-id = 2
log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 500M
log-slave-updates
auto_increment_increment = 2
auto_increment_offset = 2
innodb_flush_log_at_trx_commit = 1
sync_binlog = 1
replicate-wild-ignore-table = mysql.%
Restart MySQL.
# service mysql restart
and each node from the same command aslo mysql> SHOW SLAVE STATUS \G;
shows:
.....
Slave_IO_State: Waiting for master to send event
.....
==================================================
to check it is working well
------------------------on node1
mysql> create database testing;
on node1
mysql> show databases;
it will show u testing database
on node2
mysql> create table testing.dummy (`id` varchar(10));
on node1
mysql> show tables in testing;
:) :)