2

Okay, I've got two databases, the second one being a more up to date version of the first one. It has new columns, tables, constraints, and whatnot.

I was wondering if there is a solid program out there that will update the first database with all that of the second already updated database (Not the data, just the tables, columns and all that) or am I stuck creating my own update script from scratch?

VACIndustries
  • 367
  • 1
  • 4
  • 13
  • To clarify, you want to update the schemas without touching the data? Is that right? If so, you might want to have a look at this similar question: http://stackoverflow.com/questions/5721012/mysqldump-schema-only-schema-update-without-drop – mal-wan Sep 19 '11 at 22:06
  • Try using mysqldump to get the schema, diff the two, and then you only have a little bit of work to apply the changes. I'm sure there are commercial offerings for this if that's what you're looking for. – Stefan Mai Sep 19 '11 at 22:23

3 Answers3

2

I actually found another post, that did not look like the same thing but it still helped me anyway, I found a program called Toad for MySQL and it has a compare Schema option that compares the two databases and then can sync one to the other (it creates a script and executes it) it seems to be working flawlessly, but I'm still testing the web app that uses the database to ensure this is true.

VACIndustries
  • 367
  • 1
  • 4
  • 13
1

If you're on Windows, the RedGate SQL data and schema compare tools are beautiful:

http://mysql-compare.com/info

I've used them a few times. They're quite simple to use.

They're designed around creating DB diffs for moving from dev/QA/staging environments to integration/production environments (so yes, they generate scripts).

Merlyn Morgan-Graham
  • 58,163
  • 16
  • 128
  • 183
  • 2
    I have some news that should be popular. These tools have been made available for free for non-commercial use. Simply download and you'll be emailed a serial number. Have fun! – David Atkinson Apr 13 '16 at 21:19
0

If you are looking for a tool that will compare at the schema level then I would suggest Navicat. The older version that I use works well for getting my production and development boxes in synch. I don't recommend it for large levels of data synchronization though - it seems very slow compared to a SQL dump and SQL import.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
John M
  • 14,338
  • 29
  • 91
  • 143