Re: replication question -different db name on slave server

2008-10-13 Thread Dan Nelson
In the last episode (Oct 13), AM Corona said:
> In mysql 4, can one replicate a database to another server but have the DB
> name on the slave server be different?
> 
> Master :  dbname1
> Slave:  dbname1
> AND
> Slave :  dbname2 (but contains data from db2name1)

So you want the same data in two different databases on the same slave,
or is the 2nd slave line a different server?  If it's a different
server, then it can be done:

http://dev.mysql.com/doc/refman/5.0/en/replication-options.html#option_mysqld_replicate-rewrite-db

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: replication question -different db name on slave server

2008-10-13 Thread Rob Wultsch
On Mon, Oct 13, 2008 at 11:43 AM, AM Corona <[EMAIL PROTECTED]> wrote:

> In mysql 4, can one replicate a database to another server but have the DB
> name on the slave server be different?
>
> Master :  dbname1
> Slave:  dbname1
> AND
> Slave :  dbname2 (but contains data from db2name1)
>
> A project manager is asking for this.. don't blame the guy asking :-)
>
>
> Regards,
> Martin Corona
>

If you don't need things to synched you could *not* run a sql thread on the
slave, and then use sed/awk/whatever to filter the relay log files and then
run the sql thread. In fact I bet there is some way for awk to sit between
the relay logs and sql threads in real time...

-- 
Rob Wultsch


replication question -different db name on slave server

2008-10-13 Thread AM Corona
In mysql 4, can one replicate a database to another server but have the DB
name on the slave server be different?

Master :  dbname1
Slave:  dbname1
AND
Slave :  dbname2 (but contains data from db2name1)

A project manager is asking for this.. don't blame the guy asking :-)


Regards,
Martin Corona