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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with replication

Status
Not open for further replies.

clarissa1996

Technical User
Jan 31, 2002
78
0
0
CH
Hi all,

I have a *big* problem and before solving this problem I cannot go productive with my application. Pleas help me to find a workaround.

I have two host (A and B).
I have setup a replication (from A to B).
binlog-do-db=db1 (only db1 will be replicated from A to B).

Consider the following example:

1) On host A:
mysql
use test;
create database db2; (db2 is created only on host A)
quit

2) On host A:
mysql
drop database db2; (this command is replicated on host B)

After step 2 the replication stop.
On host B the command "show slave status" report the following error:

Last_error: Error 'Can't drop database 'db2'. Database doesn't exist' on query 'drop database db2'. Default database: ''

The problem is that if I log into host A, the commands executed before the command "use" are replicated to host B.

Best regards. Michelangelo
 
I don't know if it was a typo or deliberate but your binlog-do-db=db1 while you're trying to replicate db2.

Usually you specify databases to skip in /etc/my.cnf with a replicate-ignore-db={dbname}

That way everything else gets replicated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top