Re: Adding Multiple Databases to replication... This is How...
=============================
MASTER: add lines to my.cnf
=============================
binlog-do-db=database_name_1
binlog-do-db=database_name_2
binlog-do-db=database_name_3
=============================
MASTER: SQL SYNTAX
=============================
GRANT REPLICATION SLAVE ON *.* TO 'user'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;
SHOW MASTER STATUS;
output> file | Position | Binlog_Do_DB
mysql-bin.000963 1570 database_name_1,database_name_2,database_name_3
=============================
SLAVE: add lines to my.cnf
=============================
replicate-do-db=database_name_1
replicate-do-db=database_name_2
replicate-do-db=database_name_3
=============================
SLAVE: SQL SYNTAX
=============================
SLAVE STOP;
CHANGE MASTER TO MASTER_HOST='192.168.0.2', MASTER_USER='user', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000963', MASTER_LOG_POS=98;
START SLAVE;
SHOW SLAVE STATUS;
NOTE:
MASTER_LOG_FILE='mysql-bin.000963', MASTER_LOG_POS=98; is displayed when you run the SQL command from the master: cmd mysql#> SHOW MASTER STATUS;
ALSO:
When you run #> SHOW SLAVE STATUS;
make sure you see: Slave_IO_Running | Slave_SQL_Running
Yes Yes
Brian Miller DBA for Cryosector Technologies
Edited 2 time(s). Last edit at 04/24/2008 12:49PM by Brian Miller.
Subject
Views
Written By
Posted
18162
September 06, 2007 09:40PM
12294
September 07, 2007 03:07PM
11171
September 07, 2007 09:47PM
9894
September 10, 2007 03:05PM
Re: Adding Multiple Databases to replication... This is How...
89744
April 18, 2008 01:17PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.