开发者

Comparing two databases with mysqldump?

I have two mysql databases which should be identical to each-other. One was made by an old version of a script and another was made a new refactored version.

I need to show that these databases are identical.

I had the idea of getting a mysqldump for each one and comparing them with diff... but apparently it's not so simple.

It seems the order of the inserts in each mysqldump differs such that both files come out completely different from each-other (which they are not and it is easily discernable that the data is just showing up on different lines).

I am looking for a way to either order the output of mysqld开发者_运维百科ump or use another method to show that these two databases are exactly the same (or if not point out the differences).

Thank you for any help with this.


There is the --compatible flag that could help you doc here.

You will assign it the mysql lowest version, for example:

mysqldump --compatible=mysql40

so your output should be the same for both version (assuming they are greater than 4.0, otherwise use mysql323).


I'm using Meld to compare dumps. Works well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜