Kamis, 10 Mei 2012

Master to master - Replication


=============== SLAVE ===================
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
server-id=2
master-host = 192.168.1.1
master-user = user1
master-password = 1234
master-port = 3306
master-connect-retry=60
replicate-do-db=db_baru
------------------------
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days        = 10
max_binlog_size         = 104857600
binlog-do-db=db_baru


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

=============== MASTER ===================
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
# [mysqld] section
# Start Modification
# First line is probably already there

server-id=1
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days        = 10
max_binlog_size         = 104857600
binlog-do-db=db_baru
-------------------------
master-host = 192.168.1.2
master-user = user2
master-password = 1234
master-port = 3306
master-connect-retry=60
replicate-do-db=db_baru

0 comments:

Posting Komentar

http://www.resepkuekeringku.com/2014/11/resep-donat-empuk-ala-dunkin-donut.html http://www.resepkuekeringku.com/2015/03/resep-kue-cubit-coklat-enak-dan-sederhana.html http://www.resepkuekeringku.com/2014/10/resep-donat-kentang-empuk-lembut-dan-enak.html http://www.resepkuekeringku.com/2014/07/resep-es-krim-goreng-coklat-kriuk-mudah-dan-sederhana-dengan-saus-strawberry.html http://www.resepkuekeringku.com/2014/06/resep-kue-es-krim-goreng-enak-dan-mudah.html http://www.resepkuekeringku.com/2014/09/resep-bolu-karamel-panggang-sarang-semut-lembut.html