MySQL - Identify Differences Among Databases

13 Jan 2017

Setup

mysqldiff

mysqldiff all tables in database: https://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldiff.html

Example:

mysqldiff --server1=root@localhost --server2=root@localhost --difftype=sql --changes-for=server2 --force test:test2

mysqldbcompare

https://dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldbcompare.html

Example:

mysqldbcompare --server1=root@localhost --server2=root@localhost --difftype=sql 
 --changes-for=server2 --skip-data-check --run-all-tests 
 --skip-checksum-table --skip-data-check --skip-row-count test:test2

Issue

There is a “Bug” or missing feature to disable the export of AUTO_INCREMENT.