--- Leonardus Setiabudi <[EMAIL PROTECTED]> wrote: > 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 >
I understand now. You have 3 slave server processes replicating independently from their own separate master servers. You have a fourth MySQL server process that shares the same data files as your 3 slaves but it does not know when replication occurs and when it hasn't (for MANY reasons) so it doesn't see the updated information. First rule: Do NOT share data files between server processes. Nothing should directly interact with a datafile other than the server to which it belongs. This includes other server processes as well as direct user actions or actions from a third-party program. There are structures and procedures that each MySQL process maintains that assumes that each process has exclusive control over every data file it is managing. Sharing files between two processes is highly discouraged. However, if you are using 5.0 or newer, you can FEDERATE the files from Servers 2-4 to Server 1. That way #1 never needs to directly read from those files and you will avoid the myriad of problems that your setup can create. Your data will always be up-to-date and you won't have to worry about file caching, table caching, index caching, file locking, read/write contentions or any of those other problems. Please try shifting your table definitions on Server1 from direct-read to FEDERATED. Shawn Green Database Administrator Unimin Corporation - Spruce Pine __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]