The easiest way to see the differences between two schemas on a non-Windows machine is to run:
mysqldump -h server1 --no-data --all-databases >
mysqldump -h server2 --no-data --all-databases > file2.sql
diff file1.sql file2.sql
However, this will show also trivial differences, such as the
AUTO_INCREMENT. It also does not give you a
way to patch one schema to be like another.
We frequently are asked to “do a schema diff and create a script that will ‘patch’ one server.” Usually this is done to take a development or test schema and move it to production for a …[Read more...]