Compare structures of two databases?

前端 未结 17 1527
我在风中等你
我在风中等你 2021-02-01 04:30

I wanted to ask whether it is possible to compare the complete database structure of two huge databases. We have two databases, the one is a development database, the other a p

17条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 04:54

    You can just dump them with --no-data and compare the files.

    Remember to use the --lock-tables=0 option on your production database to avoid the big nasty global lock.

    If you use the same mysqldump version (your dev and production systems should have the same software, right?) then you'll expect to get more-or-less identical files out. The tables will be in alpha order so a simple diff will show discrepancies up easily.

提交回复
热议问题