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 a server online and I have installed MySQL and database A server on it.
I also have mysql installed on my local computer and have a copy of database A on it.
I want to compare the contents of the two databases, and possibly sync them using federated tables.

But after trying out federated table, it seems that I can’t even connect to the server.
The federated table that's supposed to be connected to (an online, not-empty) table from the server is empty.

Am I doing this right? Is this even possible?

If not, can you please suggest any tools/applications that can do this.

Thanks!

share|improve this question
    
I downloaded and used the Toad for MySQL instead. Its easy to sync databases using Toad, plus its a free tool. –  user12906 Sep 25 '12 at 15:05
add comment

migrated from stackoverflow.com Aug 8 '12 at 7:47

This question came from our site for professional and enthusiast programmers.

1 Answer

You can use Percona's pt-table-sync tool, even if the two MySQL instances are not setup for replication, with this caveat:

pt-table-sync does one-way and bidirectional synchronization of table data. It does not synchronize table structures, indexes, or any other schema objects

So something like this command (if they're not set up in replication..there's other options for the tool if they are):

pt-table-sync --dry-run host1 host2

After you're comfortable with the report, run it:

pt-table-sync --dry-run host1 host2

When using this tool, I would first make a backup of both instances. Always backup in case an issue arises!

share|improve this answer
add comment

Your Answer

 
discard

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