Data Management Service (DMS) allows you to register database instances. You can add and manage your ApsaraDB instances in the DMS console.
- An ApsaraDB instance is created, for example, an ApsaraDB RDS for MySQL instance.
- DMS is activated.
- Your account is assigned the Administrator or DBA role in DMS.
- A database instance can be managed by using multiple Alibaba Cloud accounts. Before you add this database instance in the DMS console, you must choose Register a database instance that is accessible to multiple Alibaba Cloud accounts. to add the Alibaba Cloud accounts that are allowed to manage the database instance as DMS users. For more information, see
- To allow DMS users to manage database instances in the DMS console, you must grant
permissions to them based on actual needs. For more information about the syntax that
you can use to grant permissions, see the official documentation of each type of database.
Based on the objects to be managed and the operations to be performed, the following
permissions are required:
- 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, delete, 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 separate database account when you add a database instance.
- To avoid interference, do not add special characters such as spaces before and after the information entered when you add a database instance.
- DMS allows you to add 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
- Distributed Relational Database Service (DRDS)
- ApsaraDB for OceanBase V0.5
- PolarDB for MySQL
- PolarDB for PostgreSQL
- AnalyticDB for MySQL V2.0
- AnalyticDB for MySQL V3.0
- AnalyticDB for PostgreSQL
- Data Lake Analytics (DLA)
- ApsaraDB for OceanBase
- Log on to the DMS console.
- In the left-side navigation pane, move the pointer over Add instance / Batch entry and select Add instance. The Add instance dialog box appears.Note You can also open the Add instance dialog box by using one of the following methods:
- Method 1: In the left-side navigation pane, move the pointer over the plus sign (+) and select Add instance.
- Method 2: In the top navigation bar, choose System Management > Instance. On the Instance List tab of the Instance page, click New.
- In the Add instance dialog box, the Cloud tab appears.
- On the Cloud tab, select a database type. In this example, select MySQL.
- In the Add instance dialog box, set the parameters as required.
Basic Information Database Source The source of the database instance to add. In this example, select Cloud. Database type The type of the database instance. Instance Area The region where the database instance resides. Entry mode The method that you can 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 for connecting to the database instance.Note When you add an ApsaraDB instance, DMS automatically adds the Classless Inter-Domain Routing (CIDR) blocks of the specified region in the DMS whitelist to the whitelist of the ApsaraDB instance. If the CIDR blocks fail to be automatically added, you can add them manually. For more information, see Configure a whitelist for an ApsaraDB RDS for MySQL instance and Set IP addresses in the DMS whitelist. Database account The username that you can use to log on to the database. Database password The password that you can use to log on to the database. Control Mode The control mode that is used to manage the database instance in DMS. For more information, see Control modes. Advanced information Environment type The environment of the database instance. Instance Name The name of the database instance. Enable DSQL Specifies whether to enable the cross-database query feature for the database instance. For more information, see Cross-database query. OnlineDDL Specifies whether to allow changing schemas without locking tables for the database instance and the specific method. For more information, see Change schemas without locking tables. DBA The database administrator (DBA) of the database instance, who is allowed to 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 will be 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 will be terminated to protect the database.
- In the Basic Information section, click Test connection in the lower-left corner. Wait until the connectivity test is passed.Note If the test fails, check the parameter values that you have specified.
- Click Submit.Note After the preceding steps are completed, the ApsaraDB instance is registered in DMS. You can then view and manage your database instance in the DMS console.