This section describes how to compare table schemas in DMS.
You have access permissions to DMS and you have logged on to the DMS console.
Log on to the DMS console.
Select a MySQL database and click Log on to Database.
Choose Data Operation > Table Structure Comparison on the top menu bar and enter the table schema comparison page.
Click Compare Table Structure and the Create Task dialog box appears. Select Select Source Database and Range such as All tables or Specified a table as needed.
A source database is required to compare table schemas.
You can select All tables or Specified a table as objects. You need to specify the tables for comparison if you select Specified a table in the last step.
Click Next to enter the next page to select target objects for comparison. You need to select an instance type. You can select Current Instance or Other Instances (or Other users).
You need to specify a target database if you select Current Instance.
You need to specify the method of connecting the selected instances to the target instances if you select Other Instances (or Other users). The name of the database deployed in the target instance must be identical to the name of the database deployed in the current instance.
After target objects are selected, click Next to enter the Configure Mappings page. Click Start Comparing after the mappings are configured.
By default, the system compares table schemas with identical table names from different databases.
You can select Process Prefixes to match table names.
Enter the Compare Table Structures page. DMS compares and reports the comparison results in real time.
DMS summarizes the comparison results after the comparison is completed.
Summarized results may contain the following information:
Basic information about the comparison task.
Information of the source object and the target object.
Comparison results and differences between table schemas.
Click Download different DDL statements to download DDL statements generated by comparing table schemas of the source table and the target table. Perform DDL operations on the target database. Table schemas of the source table and the target table become identical.
Click View Details to view the result details online.
You can view comparison results of all table schemas or those that contain differences.
You can select different DDL operations, such as CREATE, ALTER, and DROP to filter and view table schemas differences.
You can view previous comparison tasks on the Table Structure Comparison page. These tasks contain comparison configurations and table schema differences. You can also download and execute the DDL statements to have identical table schemas.