tags:

views:

46

answers:

3

Hi Guys,

I have multiple Mysql DB instances containing same schema but different data in the tables, running in my unix server. I always have the issue of not upgrading all the instances at the same time, this leads into inconsistent of DB schema. My question, is there any tool/script that can sync all my DB instances automatically once i upgrade one instance.("Sync only at schema level not data"). I would like to maintain multiple Master DB's. Please let me know if I am not clear with the above message.

+1  A: 

I've never heard of such a tool but I bet one could be created without too much effort.

mysqldump has a --no-data option which will dump the schema. You could have a script that dumps both the master and local copies then do a diff.

If they differ, you could parse the differences in structure and make the appropriate SQL queries to update the schema. This part is undoubtably the most difficult but I would say doable.

Seth
A: 

You might have a look at MySQL Workbench Community Edition.

I have not tried it yet but plan to download it on Monday and have a look.

Eric J.
A: 

Hey,

I haven't used it, but MMM (Multi-Master Replication Manager) seems to be a reasonable project and may be useful for you (http://mysql-mmm.org).

Regards, Jeff

Jeff Hammerbacher