On Wed, 2008-05-21 at 13:25 +0000, rwfrier@stripped wrote:
> 1. if I've got a master on host 1 that's going to be replicated to a
> single mysql server on host 2. that server on host 2 can only contain
> slaves from 1 master, although it could contain n replicated db's from
> that 1 master (on host 1). correct?
A single host can have more than one instance of MySQL-server running
(See http://dev.mysql.com/doc/refman/5.0/en/mysqld-multi.html ). Each
instance can have several databases.
> 2. With that configuration, a query could be run on server 2 that
> joins data from it's 'local' databases and the replicated db from
> server 1. correct?
> 3. If I then had server 3 that contains other databases, I'd have to
> set it up as a slave to server 2, so that replication of server 1
> would 'pass through' to server 3, and databases from server 2 would
> then be replicated to server 3, thereby allowing queries that would
> join data from server 1, server 2, and server 3. correct?
This is one way to do it or use federated tables
could be a solution.
> 4. Does this mean that db's from server 1 are replicated twice? on
> server 2 and then server 3?
> 5. Does this mean that db's from server 2 are replicated only once, to
> server 3?
You could also have two instances on host 2 that (one is slave for host
1 and the other for host 3) and use federated tables to link them
> Thanks again.
> -------------- Original message from "ewen fortune"
> <ewen.fortune@stripped>: --------------
> > Hi Russ,
> > On Tue, May 20, 2008 at 10:33 PM, wrote:
> > > need to make sure that I'm understanding this correctly:
> > > 1. a single mysqld_safe can either be a MASTER or SLAVE,
> such that all of
> > > it's database are either masters or slaves - can't have a
> mix of slaves and
> > > masters under the same mysqld_safe. Is this correct?
> > mysqld_safe is just script that sets up logging and starts
> the mysqld instance
> > Each instance can be either master, slave or both if you
> wanted to
> > setup some sort of a tree hierarchy
> > A master can have multiple slaves, but a slave can have only
> one master
> > > 2. Queries involving more than 1 database - can a single
> query pull data
> > > from databases served by different mysqld_safe's, even if
> they're on the
> > > same physical host?
> > You can do this using federated tables
> > >
> > > In other words - I need to have a single query that
> combines data from a
> > > slave database and a stand-alone (non-replicated mysql
> database). Doable?
> > > I appreciate your effort in helping me with this.
> > Take a look at the federated table stuff, it would allow you
> to query
> > tables from other MySQL instances.
> > Ewen
> > > -Russ
> > >
> > >
> > --
> > MySQL Replication Mailing List
> > For list archives: http://lists.mysql.com/replication
> > To unsubscribe: