f



Can I replicate database "foo" to database "bar"

Let's say that I have two servers, server M with database "foo" and
server S with database "bar", with full control over them. Can I set
up replication so that "foo" is replicated into "bar".

(the issue is that I have many masters with the same database name foo,
and I want to have one slave server with databases like foo-1, foo-2
etc, replicated from all those masters)

i
0
Ignoramus32732
8/14/2007 8:55:40 PM
comp.databases.mysql 6925 articles. 1 followers. laredotornado (869) is leader. Post Follow

2 Replies
361 Views

Similar Articles

[PageSpeed] 49

On 14 Aug, 22:55, Ignoramus32732 <ignoramus32...@NOSPAM.32732.invalid>
wrote:
> Let's say that I have two servers, server M with database "foo" and
> server S with database "bar", with full control over them. Can I set
> up replication so that "foo" is replicated into "bar".
>
> (the issue is that I have many masters with the same database name foo,
> and I want to have one slave server with databases like foo-1, foo-2
> etc, replicated from all those masters)
>
> i

If you serach in mySQL handbook there is a artikel how to do it,, with
mySQL 5 and above

15.4. How to Set Up Replication
http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

// Anders

0
anders
8/16/2007 6:18:10 AM
Ignoramus32732 <ignoramus32732@NOSPAM.32732.invalid> wrote:

> Let's say that I have two servers, server M with database "foo" and
> server S with database "bar", with full control over them. Can I set
> up replication so that "foo" is replicated into "bar".

There is limited support for that by using the --replicate-rewrite-db
option on the slave. For details, see:

http://dev.mysql.com/doc/refman/5.0/en/replication-options.html


> (the issue is that I have many masters with the same database name foo,
> and I want to have one slave server with databases like foo-1, foo-2
> etc, replicated from all those masters)

This is impossible. A replication slave can listen to one single
master only.


XL
--
Axel Schwenke, Support Engineer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums:  http://forums.mysql.com/
0
Axel
8/16/2007 10:11:07 AM
Reply: