[EMAIL PROTECTED] wrote:


Leonardus Setiabudi <[EMAIL PROTECTED]> wrote on 04/07/2006 05:33:50 AM:

> Hi All,
>
> I have a problem with my multi master replication plan.
> I have set my server (linux) to run 4 instance of mysqld, each with a
> different port, socket, tmpdir, log file, relay log file, master info
> and relay info.
>
> the illustration as follow :
>
> Server 1 (non slave)
> --------
> db1
> db2
> db3
> db4
>
> Server 2 (slave from other machine)
> --------
> db2
>
> Server 3 (slave from other machine)
> --------
> db3
>
> Server 4 (slave from other machine)
> --------
> db4
>
> each slave run well and replicate successfully
> but the problem is, Server 1 unable to see the update from the other
> slave server, although i can see the update from each originating slave
> server.
>
> Is this a problem with mysql (locking issue?), or file system issue?
> I am using mysql 4.1.11 on mandrake linux, with ext3 fs and all the
> tables were MYISAM
>
> Server 1 was supposed to be somekind of data warehouse, to provide data
> from many distributed servers phisically separated.
>
> Would someone please help me, i have googled this and red the manual,
> but couldnt find similiar situation.
>
> TIA
> -
> Leo
>


Just so that we are on the same page, let's review a few definitions as they relate to database replication:

master - the server from which changes will propogate during replication.
slave - the server to which replicated changes will be applied during replication.

According to the rules of MySQL replication, as I understand them, each master can be a host to many slaves but each slave can only receive changes from a single master.

You said:
> each slave run well and replicate successfully

I assume you mean servers 2-4?
yes that's correct

> but the problem is, Server 1 unable to see the update from the other
> slave server, although i can see the update from each originating slave

"other slave server"? I don't quite understand. If Server 1 is supposed to be receiving updates then it is the slave and the process it is getting the changes from is called the master. A single server process can actually have both roles as in this situation:

Server A -> replicates to -> Server B -> replicates to -> Server C

In this case A is the master of B. B is a slave of A. B is also a master to C which is the slave of B. Multi-master replication would be something like this:

Server A -> Server C
Server B -> Server C

In this plan, Server C would be recieving changes from both A and B. However the current design of MySQL limits you to having only *ONE* master per slave for many excellent reasons (search the recent archives of this list for a few).

Can you possibly re-explain your situation using the terms master and slave as I just used them?
no, that's not the situation ..
ok, maybe i leave some detail here ...
let me re-explain my situation ..

the mysql server was on /home/mysql/mysql4111
and the data directory  was on /home/mysql/mysql4111/data
in data directory, there are 4 databases, db1, db2, db3, db4
all configurations resided in /home/mysql/replicate.. those are my.cnf, replicate1.cnf, replicate2.cnf and replicate3.cnf

servers, run with this command :
/home/mysql/mysql4111/bin/mysqld --defaults-file=/home/mysql/replicate/my.cnf /home/mysql/mysql4111/bin/mysqld --defaults-file=/home/mysql/replicate/replicate1.cnf /home/mysql/mysql4111/bin/mysqld --defaults-file=/home/mysql/replicate/replicate2.cnf /home/mysql/mysql4111/bin/mysqld --defaults-file=/home/mysql/replicate/replicate3.cnf

server 1 is just a plain server, not a master nor a slave
other are slaves to each of their own master (hence the different configuration files)


so if i draw it it would be something like this

---
| |  db1 |----------------------------------- server 1 port 3306
|D| | | | db2 | |--------------------- server 2
|A|      |
| |  db3 | |--------------------- server 3
|T|      |
| |  db4 | |--------------------- server 4
|A|
| |
---

server 2, only replicates db2 from its master, runs on port 3307
server 3, only replicates db3 from its master, runs on port 3308
server 4, only replicates db4 from its master, runs on port 3309

when i log into server 2 using port 3307, i can see the data in db2 updated, which means the replication succeed (show slave status tells the same thing), and the same thing with server 3, i can see db3 updated, also with server 4 where db4 updated

but when i log into server1, where i can access all the dbs, db2-4 were never updated (it should be, its the same file) in this time, if i run repair table on server1 to all tables in db2-4 .. bingo, the data appears ..
with the info, found xxx rows of 0 rows

so, to be clear ... server1 is NOT a SLAVE, its just plain server
server2-4 runs well, and replicate well ... the problem lies within server1, where it supposed to be able to read the FILE (tables) without the need to issue repair command (at least in my assumption :) )

i hope this will bring more detail ..

thanks
-
leo



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

Reply via email to