Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have two identical MySQL innodb table with 10M rows each. One is used at backend while other at application end. Thus, either of them loaded. I need to synchronize them in a way which is fast and non blocking. How can I do that?

Is there any particular LINUX software for this?

And how about syncing two dbs?

EDIT

Both tables exist on different dbs hosted on different machines. And both of them are updated separately before the sync process.

share|improve this question
1  
Are the two tables in separate databases, are the databases on different servers? What is the purpose of separating the two tables? Are updates made to both tables or only one of the tables? –  ssmusoke Apr 10 '12 at 5:27
    
Both tables exist on different dbs hosted on different machines. And both of them are updated separately before the sync process. –  dragosrsupercool Apr 10 '12 at 5:56
1  
Is it the same database on two machines or are there major differences between the two databases? –  ssmusoke Apr 10 '12 at 6:00
2  
how should conflicts be handled, e.g. a row was updated on both servers in a different way, a row updated on one server is deleted on the other server, on both servers different rows are inserted with the same primary key? Are there references to other tables? –  miracle173 Apr 10 '12 at 7:17
    
@ssmusoke: different machines –  dragosrsupercool Apr 10 '12 at 8:02

2 Answers 2

pt-table-sync from Percona Toolkit will do this sort of thing.

share|improve this answer

SQLyog will solve this easily. It has Database synchronization feature which will be helpful in keeping data between two remote/local databases in sync. It has sja utility for linux as well you can schedule your synchronziation process using CRONJOB. Try it I am sure this will solve your purpose.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.