This topic describes how to use Data Management (DMS) to perform the lock-free schema change of an ApsaraDB RDS for MySQL instance.
Create an instance and enable lock-free schema change
- Log on to the DMS console V5.0.
- In the left-side navigation pane, click . Note If you log on to the DMS console in simple mode, click Database instance in the left-side navigation pane and click .
- In the Add Instance dialog box, configure the following information:
- On the Alibaba Cloud tab, select MySQL.
- Configure Basic Information and Advanced Information. For more information, see Register an ApsaraDB instance.
Section Parameter Description Data source N/A The source of the database instance. You can click the Alibaba Cloud or Third-party Cloud/Self-managed tab. In this example, MySQL is selected on the Alibaba Cloud tab. Basic Information Database Type The type of the database instance. Instance Region The region in which the database instance resides. Other primary accounts This parameter appears if you click Cross-Alibaba Cloud account instances. The Alibaba Cloud account to which the database instance belongs.Note If the Alibaba Cloud account is not in the list, you can click Add User to add the Alibaba Cloud account used to purchase the Elastic Compute Service (ECS) instance on which the database is hosted. For more information, see Add a user. Entry mode The method that you use to log on to the database instance. Valid values: Instance ID and Connection string address. Instance ID or Connection string address The ID of the database instance or the endpoint of the database instance.Note The connection string address is in the following format: Internal network address:Port number. Example: rm-XXXXXXX.mysql.rds.aliyuncs.com:3306. Database Account The account that you use to log on to the database instance.Note You can use the specified database account to perform operations such as read and write operations on the data of the database instance in DMS. You must specify a database account that has the required permissions. Database password The password of the account that you use to log on to the database instance. Control Mode The control mode that you use to manage the database instance in DMS. For more information, see Control modes. Sensitive Data Protection This feature allows you to control and mask sensitive data. You can select whether to enable this feature based on your business requirements. For more information, see Enable the sensitive data protection feature. Classification template If you turn on Sensitive Data Protection, the Classification template parameter appears.
You can bind a classification and grading template to an instance to identify whether the fields in databases and tables in the instance comply with the identification rules of the template. If the fields comply with the identification rules, the fields are labeled for classification and grading to protect the fields with high sensitivity levels. For more information, see Manage DMS classification and grading templates.
Advanced Information Environment type The type of the environment in which the database instance is deployed. For more information, see Environment types. Instance Name The name that you specify for the database instance.Note If you register an ApsaraDB instance for the first time, the name of the ApsaraDB instance is synchronized to DMS. DMS does not synchronize the name when you perform subsequent operations. You can change the name of the instance to manage the instance name. For more information, see Modify database instances. Lock-free Schema Change Specifies whether to enable lock-free schema change. For more information, see Enable the lock-free schema change feature.
- Open (DMS OnlineDDL first)
- Open (MySQL Native OnlineDDL first)
Enable SSL Specifies whether to allow DMS to connect to the database instance by using SSL connections. After this feature is enabled, DMS can connect to the database instance by using SSL connections.
SSL encrypts network connections at the transport layer to improve the security and integrity of data in transit. However, SSL increases the response time of network connections.
Before you use SSL connections, make sure that the SSL encryption feature is enabled for the database instance. Valid values:
Note This parameter is displayed only for MySQL databases.
- Default (DMS automatically checks whether self-negotiation is enabled for the database instance.): DMS automatically checks whether the SSL encryption feature is enabled for the database instance. If the SSL encryption feature is enabled, DMS connects to the database instance by using SSL connections. Otherwise, DMS connects to the database instance without encryption.
- Open: DMS connects to the database instance by using SSL connections. This value is invalid if you disable the SSL encryption feature for the database instance.
- Close: DMS does not connect to the database instance by using SSL connections.
DBA The DBA of the database instance. The DBA can grant permissions to users. query timeout(s) The timeout period for the execution of an SQL query statement. If the execution of an SQL query statement lasts longer than the specified timeout period, the execution of the statement is terminated to protect the database. export timeout(s) The timeout period for the execution of an SQL export statement. If the execution of an SQL export statement lasts longer than the specified timeout period, the execution of the statement is terminated to protect the database.
- After you configure the parameters, click Test connection in the lower-left corner of the Add Instance dialog box. Note If the connectivity test fails, check the parameter values that you specify based on the error message.
- After the test succeeds, click Submit.
Normal Data Modify
For more information about how to change regular data in DMS, see Change regular data.
Wait until the data change task is complete and perform the following steps to view the details of the task.
- In the top navigation bar, click O&M. In the left-side navigation pane, click .
- On the Task tab, click the task number that you want to manage.
- On the Execution Details page that appears, click Progress in the Actions column next to the task number. On the page that appears, you can view the details of the task.