This is a tool that compares the differences between two databases and generates updated SQL statement scripts.
mysqlDiff Introduction
Based on the two URLs entered to connect to the two databases targetDB and sourceDB respectively. mysqlDIff tool will analyze the two databases and give the sql script for updating from targetDB to sourceDB.
Case classification
if targetDB contains tables that do not exist in sourceDB, the corresponding DROP TABLE statement is given. 2. if sourceDB contains tables that do not exist in sourceDB, the corresponding DROP TABLE statement is given.
if the sourceDB contains a table that does not exist in the targetDB, such as the STUDENT table, a table build statement for the STUDENT table will be given.
if sourceDB and targetDB contain several tables with the same name, such as tables, then sqlDiff tool will compare the differences between each pair of them with the same name and give the table structure update statement from targetDB->sourceDB, even the index update sql statement.
How to use
Download the corresponding release according to your operating system (the following is an example of linux environment).
Switch the directory in the command line to the directory corresponding to the release bution you just downloaded and use sqlDiff_mysqlXXX -h to see how to use it (make sure the version of mysql you want to link to is the same as the release description).
Execute the binary ask file and the SQL script will be output in the command line below.