We may have development database and production database. We may have the same data stored in the same table on multiple databases just because the data volume is too large to fit in one database. When we are making the structure change, we hope they are in consistent state.
You may want to compare table structure for different tables, for example, we define one table for each day's data, or each month's data. And also you may want to compare the index difference between these tables.
I always perform the structure changes for multiple tables across multiple databases. In order to reduce the human errors, I have to write an effective script to check them and send email to me if something was wrong. The script I wrote is named "compare_column.pl".
With this powerful perl script (Download), What I need to do is to create a configuration table to specify which tables on which databases to be compared, then create a job to run it weekly or daily.
I will tell you how to create the configuration later.