3.1.4 How Can I Tell If a Table on Server X has the same Structure as the Same Table on Server Y? Objectives Example Execution Discussion Permissions Required Tips and Tricks

Multiple database servers that are kept synchronized manually or are compartmentalized for security purposes but are by practice kept up-to-date manually are prone to unintentional (and sometimes intentional) divergence.

For example, you may maintain a production server and a development server. The development server may have the same databases and the same structures as the production server (but maybe not the same data). However, the natural course of administrative tasks and maintenance can sometimes leave the development server behind.

When this happens, you need to have a way to quickly check the schema for a table on the production server to see if the development server has the same structure. The utility of choice for this operation is mysqldiff.