List:Replication« Previous MessageNext Message »
From:Marcus Bointon Date:October 4 2007 1:09am
Subject:Adding a DB to a replication set
View as plain text  
I have 2 servers running circular replication successfully. I need to  
add a database to the replication without disturbing the one that is  
already there. The new DB can start from scratch, something I've done  
before - replicate an empty db then import the data. So far I've tried:

Add new database name to my.cnf in a replicate-do-db line.

Create empty db on master 1
Create empty db on master 2
Restart mysql

No joy here. I also tried the other order (after dropping the DBs):

Restart mysql
Create empty db on master 1
Create empty db on master 2

Either way, the new DB name shows up in slave status, but no  
replication happens.

Because no data or sql queries are involved, I'm guessing I should  
not have to do a complete resync or reset the master. Obviously, the  
servers are in sync already.

It could be a chicken and egg problem - if the dbs don't exist then  
it can't replicate them. If the dbs are created independently on each  
server, they are out of sync. It seems you can't create a db across  
the replication.

How can I achieve this?

Marcus Bointon
Synchromedia Limited: Creators of
UK resellers of info@hand CRM solutions
marcus@stripped |

Adding a DB to a replication setMarcus Bointon4 Oct
  • Re: Adding a DB to a replication setHartleigh Burton4 Oct
    • Re: Adding a DB to a replication setDatabase System4 Oct