Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add database to mysql replication

Status
Not open for further replies.

csgonan

MIS
May 2, 2007
118
US
I am running mysql 5.0.22 on solaris 8 servers. I currently replicate one database between two servers. My replication server configuration is that BOTH servers are master servers. I would like to add another database to be replicated but I am not sure how to do it (since I didn't set up the first).

How do I add another database to be replicated? Do I specify a different binlog for the database? These are innodb databases?

These are my current settings for one of the masters?

log-bin=server1-bin
replicate-wild-do-table=OURDB.%
# error 1062 = Duplicate entry
# error 1146 = Table doesnt exist
slave-skip-errors=1062,1146
replicate-same-server-id=0

log-bin=server2-bin
replicate-wild-do-table=OURDB.%
# error 1062 = Duplicate entry
# error 1146 = Table doesnt exist
slave-skip-errors=1062
log-slave-updates
replicate-same-server-id=0

Also, I use innodb hotback to backup the databases? If I had to use innodb to restore one database, and one binlog is used, how do I insure that only the correct database is restored?

Thank you
 
YMMV as you may not have posted all the relevant bits of you my.cnf and I don't fully know your architecture.

You'll likely need to remove or add an additional "replicate-wild-do-table=OURDB.%" variable as that is defining which binary logs a slave processes and therefore which DB is being replicated.

I'm almost 100% sure that you cannot separate the binary logs per DB.

If you need to figure out engine type, do a show create table.

Not familiar with Innodb hotbackup.

-cs

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top