Before you use Data Management (DMS) to manage a database instance, you must register or log on to the database instance. This topic describes how to switch from the console of a database instance to the DMS console and log on to the database instance. This topic also describes how to register a database instance with DMS and log on to a database instance that is disconnected from DMS.
Prerequisites
The account that you use to log on to a database instance is granted the permissions on the databases and tables in the database instance. For more information, see the FAQ section of this topic.
The IP addresses and CIDR blocks of DMS servers are added to the security settings such as the whitelist and security group of the database instance that you want to manage. For more information, see Add DMS IP addresses and CIDR blocks to security settings.
Usage notes
We recommend that you create a separate database account and use the new database account to register a database instance with DMS. Do not use a database account that is used by other services.
We recommend that you enable security hosting for the database instance that you want to manage in DMS. Otherwise, you must enter the database account and password each time you log on to the database instance. For more information, see Security hosting.
To prevent logon failures, do not prefix or suffix the instance information that you enter with special characters such as spaces when you register a database instance.
If you want to log on to a PolarDB for MySQL cluster whose major version is being upgraded or to be upgraded from DMS, take note of the following items:
Wait until the major version of the PolarDB for MySQL cluster is upgraded before you log on to the PolarDB for MySQL cluster.
If you have registered the PolarDB for MySQL cluster with DMS, you must manually modify the instance information in DMS to automatically synchronize the instance name after the cluster is upgraded. Then, you need to update or synchronize the data dictionary of the instance to ensure that the information such as the instance endpoint and instance name is the latest in the DMS. For more information, see Modify database instances and Synchronize the data dictionary of a database instance.
When you log on to an ApsaraDB for MongoDB instance, enter the account and password that are configured in the ApsaraDB for MongoDB console as is. You do not need to escape the special characters in the password.
Logon methods
Instance status | Type | Logon method |
New instance to which you have never logged on from DMS | Alibaba Cloud database instance | (Recommended) Switch from the console of a database instance to the DMS console and log on to the database instance |
Alibaba Cloud database instance, database instance hosted on a third-party cloud service, or self-managed database instance | ||
Existing instance | Unlimited |
Switch from the console of a database instance to the DMS console and log on the database instance
In this example, an ApsaraDB RDS for MySQL database instance is used.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. On the Instances page, find the ApsaraDB RDS instance that you want to manage and click the instance ID.
In the left-side navigation pane, click Accounts to view the accounts of the instance.
NoteIf you forget the password of the account that you want to use, click Reset Password in the Actions column. For more information, see Reset the password of an account on an ApsaraDB RDS for MySQL instance.
In the upper part of the instance details page, click Log On to Database.
You are navigated to the DMS console. The Log on to Database Instance dialog box appears.
Configure the Database Account and Database Password parameters.
NoteThe Database Account parameter specifies the username of the account that is used to log on to the database instance. Do not enter the database name.
Click Login.
Register a database instance
Log on to a database instance that is disconnected from DMS
For a database instance that has been registered with DMS and is managed in Flexible Management mode, the database instance is disconnected from DMS 24 hours after you log on to the database instance. If you want to use the database instance, you must log on to the instance again.
- Log on to the DMS console V5.0.
In the left-side navigation pane, click Instances Disconnected, find the database instance to which you want to log on, and then right-click the instance.
NoteDatabase instances are displayed in the Logon-free Instances, Instances Connected, and Instances Disconnected sections.
Select Login Instance. In the Login Instance dialog box, configure the Database Account and Database Password parameters.
NoteThe Database Account parameter specifies the username of the account that is used to log on to the database instance. Do not enter the database name.
Click OK.
After you log on to the database instance, the SQL Console tab appears. You can perform operations on the database instance based on your business requirements.
What to do next
After you log on to a database instance in DMS, you can perform the following operations based on your business requirements:
Manage the database instance. For example, you can create databases, create tables in a database, and query or modify table data. For more information, see Manage a database on the SQLConsole tab.
Modify a large amount of table data without the need to lock tables. For more information, see Perform lock-free DML operations.
Export table data. For more information, see Export data.
For more information about how to troubleshoot logon failures, see FAQ about database logon.
FAQ
Q: What do I do if the following whitelist error message appears when I register an Alibaba Cloud database instance with DMS?
A: You can click Configure Whitelist in the message. The system automatically adds the IP addresses and CIDR blocks of DMS servers to the whitelist of the Alibaba Cloud database instance. If the IP addresses and CIDR blocks fail to be automatically added to the whitelist, you need to manually add them to the whitelist. For more information, see Add DMS IP addresses and CIDR blocks to security settings.
Q: Does DMS support the Flexible Management mode?
A: Yes, DMS supports the Flexible Management mode. If you do not select the Stable Change or Security Collaboration mode when you register a database instance with DMS, the database instance is managed in Flexible Management mode by default.
Q: I have enabled the Secure Sockets Layer (SSL) or Transport Security Layer (TSL) encryption protocol for an ApsaraDB for Redis instance, but the following error message appears when I log on to the ApsaraDB for Redis instance in the DMS console. What do I do to resolve this issue?
A: Make sure that SSL is enabled for the instance in DMS. You can perform the following operations to resolve this issue:
- Log on to the DMS console V5.0.
On the Home page of the DMS console, choose
in the left-side navigation pane. In the instance list that appears, right-click the ApsaraDB for Redis instance to which you want to log on and click Edit.In the Advanced Information section of the Edit dialog box, set the Enable SSL parameter to Enable.
Click Test Connection.
After the connection test is passed, click Save. Then, the database instance is connected to DMS.
For more information about how to modify a database instance, see Modify database instances.
Q: The IP addresses and CIDR blocks of DMS servers are added to the whitelist of Azure SQL Database. However, when I register the database instance in the DMS console, the following error message appears. What do I do to resolve this issue?
A: Enter the database account in the Database account@Server name format for the Database Account parameter in the Add Instance dialog box. Then, connect to the database instance again. For example, if the public endpoint of the Azure instance is
testservername.testdatabase.windows.net
and the database account istestuser
, you need to entertestuser@testservername
for the Database Account parameter.Q: How do I grant permissions to a database account that is used to log on to DMS?
A: The specific statement used to grant permissions to a database account varies with the database type. For more information, see the documentation on the official website of each database type. Permission description:
To manage all the databases on an instance, the database account must have permissions on all the databases.
To manage one or more databases of an instance, the database account must have permissions on the specified databases.
To add, delete, modify, and query data and modify table schemas on an instance, the database account must have Data Manipulation Language (DML) and Data Definition Language (DDL) permissions.
To perform operations on objects, such as views, stored procedures, triggers, and functions on an instance, the database account must have the required permissions on these objects.
Q: How do I log on to a database instance that has been deleted in DMS?
A: Make sure that the database instance is running. Then, go to the Instance List tab in the DMS console. Find the database instance that you want to manage and choose More > Login Instance in the Actions column. In the Login Instance dialog box, enter the database account and database password and click Save. For more information about how to modify a database instance, see Modify database instances.