All Products
Search
Document Center

Register an ApsaraDB instance

Last Updated: May 08, 2020

Data Management Service (DMS) allows you to register and manage an ApsaraDB instance in the DMS console.

Background

  • When you register an ApsaraDB instance in the DMS console, you need to grant the required permissions to the corresponding DMS user. The syntax and parameters of the authorization statements vary depending on the specific database engine that the instance adopts. For more information, see the documentation provided on the Alibaba Cloud official website. The required permissions are described as follows:

  • To manage all the databases of an instance, a DMS user must have permissions on all the databases.

  • To manage one or more databases of an instance, a DMS user must have permissions on the specific databases.

  • To add data to, delete data from, modify, and query data in an instance, and change schemas, a DMS user must have sufficient data manipulation language (DML) permissions.

  • To perform operations on objects such as views, stored procedures, triggers, and functions in an instance, a DMS user must have sufficient permissions on these objects.

  • We recommend that you create a new account to log on to the databases when you register an instance instead of using an account that has been in use.

  • Make sure that no spaces are added before and after the parameter values to avoid logon failures.

  • Currently, DMS allows you to register the following types of ApsaraDB instances:

    • ApsaraDB RDS for MySQL
    • ApsaraDB RDS for SQL Server
    • ApsaraDB RDS for PostgreSQL
    • ApsaraDB for MongoDB
    • ApsaraDB for Redis
    • DRDS
    • ApsaraDB for OceanBase V0.5
    • Apsara PolarDB for MySQL
    • Apsara PolarDB for Oracle
    • Apsara PolarDB for PostgreSQL
    • AnalyticDB V2.0
    • AnalyticDB for MySQL V3.0
    • AnalyticDB for PostgreSQL
    • Data Lake Analytics
    • ApsaraDB for OceanBase

Prerequisites

  • An ApsaraDB instance is created, for example, an ApsaraDB for MySQL instance.

  • DMS is activated.

  • You are a database administrator (DBA) or a DMS administrator.

Procedure

  1. Log on to the DMS console.

  2. Move the pointer over the plus sign (+) in the upper-left corner and select Add instance. The Add instance dialog box appears.

    You can also open the Add instance dialog box in the following way:
    In the top navigation bar, choose System Management > Instance. On the Instance List tab of the Instance page, click New in the upper-left corner.

  3. In the Add instance dialog box, click the Cloud tab.

  4. In the Cloud section, select a database type.

  5. In the dialog box that appears, set the parameters as required. The following table describes the parameters.pic1

    Tab Parameter Description
    Basic Information Database Source The category of the data source. Set this parameter to Cloud.
    Database type The type of the ApsaraDB instance to be registered.
    Instance Area The region where the ApsaraDB instance is deployed.
    Entry mode The mode of registering the ApsaraDB instance.
    Instance ID The ID of the ApsaraDB instance.
    Database account The username that you use to log on to the ApsaraDB instance.
    Database password The password that you use to log on to the ApsaraDB instance.
    Control Mode The control mode that is used to manage the instance in DMS. For more information, see Control modes.
    Advanced Information Environment type The type of environment where the ApsaraDB instance is deployed.
    Instance Name The name that you specify for the instance in DMS.
    Enable DSQL Specifies whether to enable the cross-database query feature for the ApsaraDB instance. For more information, see Cross-database query.
    OnlineDDL Specifies whether to allow changing schemas without locking tables for the ApsaraDB instance and the specific method. For more information, see Change schemas without locking tables.
    DBA The DBA of the instance who is allowed to grant permissions to users.
    query timeout(s) The timeout interval of the statement that is used to query data. When the specified time interval is reached, the target statement run in the SQL editor is stopped to protect the database security.
    export timeout(s) The timeout interval of the statement that is used to export statistics. When the specified time interval is reached, the target statement run in the SQL editor is stopped to protect the database security.
  6. On the Basic Information tab, click Test connection in the lower-left corner. Wait until the connectivity test is passed.

    If the test fails, check the parameter values that you specify.

  7. Click Submit.

    Now you have registered an ApsaraDB instance from the specified Alibaba Cloud service as an instance in DMS and the instance appears in the left-side navigation pane of the DMS console. You can view and manage the instance in the DMS console.