At work I’ve been maintaining a number of development areas and needed a way to compare database changes so that I didn’t overwrite a clients changes with my new/updated data from developing a new feature.
There seemed to be many ways of comparing the schema of two databases, but nothing to compare the changes in data (unless I was looking in the wrong places). I decided to write something that would help me out and have released it publicly.
You provide the connection details of two databases (server, username, password, name), select the tables you would like to compare and hit “Compare”. The resulting page is a list of all schema and data changes.
There are plans to style the application (at the moment its simple blocks and tables) and more importantly, allow you to select which differences you would like to apply before creating a .sql diff file.
If its something you’re interested in, trying check out the google code page for the project. Its currently in beta with better performance, stability and functionality to come!
Warning: Declaration of Social_Walker_Comment::start_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::start_lvl(&$output, $depth = 0, $args = Array) in /home/customer/www/arronwoods.com/public_html/blog/wp-content/plugins/social/lib/social/walker/comment.php on line 18
Warning: Declaration of Social_Walker_Comment::end_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::end_lvl(&$output, $depth = 0, $args = Array) in /home/customer/www/arronwoods.com/public_html/blog/wp-content/plugins/social/lib/social/walker/comment.php on line 42
hi, you can use third party tool for that, although its not free it does a terrific job of comparing\migrating data.
Nob Hill’s Compare – http://www.nobhillsoft.com/NHDBCompare.aspx
Yeah, I did find the Nob Hill software, as well as a number of other shareware/commercial products. The aim with phpMyDiff is to create a free alternative, that is, when I get round to writing the export diff functionality.
I for one wouldn’t want to pay $99 for infrequently comparing database changes. 🙂
Hi,
Thanks a lot for this tool, just what I needed.
Generating sql code would be fantastic.
You saved my day. I spent more than 7 hours searching and testing diff tools until I stumbled upon your blog on google when I searched for the term “database diff mysql”. Thanks a bunch.
For comparing schemas, also please look at our tool – http://www.sqledt.com, it has a LOT of functionality in addition to schema compare/data compare. Once you start using it, it will pay for itself many times over in the amount of time you’ll save working with databases. There are discounts/goodwill licenses available, so if price is a concern, please ask!
Thanks a lot for this softie. 🙂
sql export would be nice, I agree! dislike seeing people trying to spam their product – for fees – when this is free, go advertise on your own dime! this guys doing something great.
Thank you so much for this utility! I am so relieved to have found this!
FYI RE: setting cache dir: I did not find ‘application/config/mydiff.ini’ as indicated in the Wiki’s installation guide – I changed APP_DIR\library\MyDiff\Cache.php (easy).
I second the other commenter’s request that an SQP patch generator would be fantastic.
Please, these are only friendly, constructive pointers – I am absolutely THRILLED with your utility. Thanks again!
Thank you for this tool! Saved me hours in figuring out how to automate content import into a (poorly documented) CMS.
Thank you for this blog post. Creating multiple sites using the same schema is something I have been working on for years. This tool allows me to keep my custom sites uniform at the Database level. Thank you.
Hello, thanks for this informative blog. I have a question about PhpMyDiff. I am using utf8_unicode_ci mysql databases and the Turkish characters is coming as ? character. I tried different solutions and my problem is still continuing. If anybody can show me the way I will be gratefull. Thank you.