Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

Compare (collate) MySQL databases

Type: Picture Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Intermediate Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2010-Jan-11
Networking, Programming and Graphics - Tutorials
Visited: 585 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Tony Potter

Recently I used to be in a group that had a task to migrate few servers without downtime, and by mistake made by one of our system administrators one of the servers went live with outdated database.

Since when we discovered that mistake two days later, there were major changes happened on the database and we had to compare it with the most recent one.

I will not fall into details, but I will say that on that server we didn’t have SSH access, as well as that the remote access to 3306 port number was forbidden. PHPMyAdmin installation was the only way to dump the database.

Then we had to compare the MySQL changes that were made on the database while it was live.
During that time I found ExamDiff which is a freeware Windows tool for visual database comparison. It has a number of simple and convenient features that many users have been asking for a long time from a file comparison tool.

The tool usage is rather easy. Start the application and then choose the MySQL databases backups to compare.
Compare (collate) MySQL databases
There is also ‘Options’ menu which is pretty self explainable for an experienced MySQL database user.

Click ‘Ok’ and the differences will be displayed as listings with line numbers.
Compare (collate) MySQL databases
As you can see there are number of visual options that allows you display the MySQL database differences in the best way you need them.
It has a long list of options described in this article: Visual file comparison - ExamDiff preferences

If you prefer the command line usage here are the available options:
Usage: ExamDiff [Filename1] [Filename2] [Options]

Filename1, Filename2 are names of databases to be compared
Options are any of:
          /i    ignore case
          /w    ignore all white space in lines
          /b    ignore changes in amount of white space in lines
          /l    ignore leading white space in lines
          /e    ignore trailing white space in lines
          /t    treat both databases as text databases
          /d    show differences only
          /n    don't show initial "Compare databases" dialog
          /sd   always show initial "Compare" dialog, even if 
                two filenames are used
          /aN   scroll trough all differences with N second delay 
                and exit after the last difference
          /?,/h print this screen
       NOTE: if options /i, /w, /b, /l, /e, /t, or /d are not set, 
             the last used options remain in effect.
Rate this tutorial:                    
Post Comment

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: