phpMyDiff – Compare mysql database schema and data

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!

phpMyDiff at Google Code

This entry was posted in Googled, Web dev. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

8 Comments

  1. Itamar
    Posted March 2, 2010 at 8:45 pm | Permalink

    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

  2. Cohen
    Posted March 2, 2010 at 11:38 pm | Permalink

    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. :)

  3. Posted May 22, 2010 at 9:29 am | Permalink

    Hi,
    Thanks a lot for this tool, just what I needed.
    Generating sql code would be fantastic.

  4. Posted December 18, 2010 at 12:10 am | Permalink

    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.

  5. Posted February 8, 2011 at 8:19 pm | Permalink

    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!

  6. Posted February 14, 2011 at 12:02 pm | Permalink

    Thanks a lot for this softie. :)

  7. William
    Posted June 10, 2011 at 11:38 pm | Permalink

    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.

  8. Claudia
    Posted August 8, 2011 at 3:10 pm | Permalink

    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!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

  • Categories

  • Archives