Quantcast
Channel: MySQL Forums - Replication
Viewing all articles
Browse latest Browse all 1562

Replication replicate-rewrite-db not working (1 reply)

$
0
0
Hello all,

I have a problem getting replicate-rewrite-db working.

Some info:

I have 1 master and 3 slaves using replication.

On the master the are my replication settings:

server-id = 1
sync_binlog = 1
slave_compressed_protocol=1
binlog-do-db = reizen_xml
binlog-do-db = reizen_nl
binlog-do-db = reizen_de

On 2 slaves I have these Replication settings in my.cnf:

server-id = X
read-only
replicate-do-db=reizen_xml
replicate-do-db=reizen_de
replicate-do-db=reizen_nl
slave_compressed_protocol=1

Ok, so far these 2 slave are working perfectly! Any modifications on the master are synced to the slaves with 0s delay. Great!

Problem. On my 3th slave I only want the reizen_nl db, BUT it HAS TO update in another db on the slave, called 'reizen'.

Ok, first some test, I have setup the third slave with:

server-id = X
read-only
replicate-do-db=reizen_nl
slave_compressed_protocol=1

Ok, this works! Slave writes everything to reizen_nl and everything is synced.
However, this is not what i want. I want reizen_nl to sync to reizen. So, I've added the replicate-rewrite-db option in my.cnf:

replicate-rewrite-db=reizen_nl->reizen
replicate-do-db=reizen
slave_compressed_protocol=1

Now it failes to update the replication process.

Last_Error: Error 'Table 'reizen_nl.best_travel_sites' doesn't exist' on query. Default database: 'reizen'. Query: 'DELETE FROM `reizen_nl`.`best_travel_sites` WHERE `best_travel_sites`.`id` = 11'

Any help is much appreciated

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>