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

  1. Log on to the DMS console V5.0.
  2. In the left-side navigation pane, click add.
    Note If you log on to the DMS console in simple mode, click Database instance in the left-side navigation pane and click add.
  3. In the Add Instance dialog box, configure the following information:
    1. On the Alibaba Cloud tab, select MySQL.
    2. Configure Basic Information and Advanced Information. For more information, see Register an ApsaraDB instance.
      SectionParameterDescription
      Data sourceN/AThe 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 InformationDatabase TypeThe type of the database instance.
      Instance RegionThe region in which the database instance resides.
      Other primary accountsThis 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 modeThe method that you use to log on to the database instance. Valid values: Instance ID and Connection string address.
      Instance ID or Connection string addressThe 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 AccountThe 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 passwordThe password of the account that you use to log on to the database instance.
      Control ModeThe control mode that you use to manage the database instance in DMS. For more information, see Control modes.
      Sensitive Data ProtectionThis 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 templateIf 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 InformationEnvironment typeThe type of the environment in which the database instance is deployed. For more information, see Environment types.
      Instance NameThe 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 ChangeSpecifies 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)
      • Close
      Enable SSLSpecifies 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:

      • 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.
      Note This parameter is displayed only for MySQL databases.
      DBAThe 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.
  4. 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.
  5. After the test succeeds, click Submit.

Normal Data Modify

For more information about how to change regular data in DMS, see Change regular data.

Note If the lock-free schema change feature is enabled, you can submit a ticket on the Normal Data Modify page to change schemas without locking tables.

Wait until the data change task is complete and perform the following steps to view the details of the task.

  1. In the top navigation bar, click O&M. In the left-side navigation pane, click Task.
  2. On the Task tab, click the task number that you want to manage.
  3. 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.