All Products
Search
Document Center

ApsaraDB for SelectDB:Connect to an ApsaraDB for SelectDB instance by using DMS

Last Updated:Jul 02, 2024

ApsaraDB for SelectDB supports connection over the MySQL protocol. You can connect to an ApsaraDB for SelectDB instance by using tools that are compatible with the MySQL ecosystem, such as command-line tools, Java Database Connectivity (JDBC) or Open Database Connectivity (ODBC) drivers, or visualization tools. This topic describes how to connect to an ApsaraDB for SelectDB instance by using Data Management (DMS).

Background information

DMS is a GUI-based data management tool that is provided by Alibaba Cloud. You can use DMS to manage relational databases and NoSQL databases. DMS supports features such as data management, SQL operations, data solutions that include data import, data export, and database clone, performance and optimization, and security audit. You can use DMS to manage databases with ease, create databases and tables online, and query data online. This enhances data security, improves management efficiency, and helps mine data values.

Prerequisites

  • An ApsaraDB for SelectDB instance is created. For more information, see Create an ApsaraDB for SelectDB instance.

  • The password of the admin user is reset for the ApsaraDB for SelectDB instance. For more information, see Reset the admin password.

  • The IP addresses of DMS servers are added to the IP address whitelist of the ApsaraDB for SelectDB instance. For more information about the IP addresses of DMS servers, see the DMS IP addresses and CIDR blocks section of the "Configure an IP address" topic. For more information about how to configure an IP address whitelist for an ApsaraDB for SelectDB instance, see Configure an IP address whitelist.

Procedure

  1. Log on to the ApsaraDB for SelectDB console.

  2. In the top navigation bar, select the region in which the instance that you want to manage resides.

  3. In the left-side navigation pane, click Instances. On the Instances page, find the instance and click the instance ID. The Instance Details page appears.

  4. On the Instance Details page, click Log on to Database in the upper-right corner.

  5. In the dialog box that appears, configure the parameters that are described in the following table as prompted.

    Parameter

    Description

    Database Type

    The type of the database to which you want to connect. By default, the value of this parameter is fixed to SelectDB, which indicates ApsaraDB for SelectDB. You do not need to modify this parameter.

    Instance Region

    The region in which the instance resides. By default, the value of this parameter is set to the region in which the current ApsaraDB for SelectDB instance resides. You do not need to modify this parameter.

    Note

    If you want to log on to an ApsaraDB for SelectDB instance that resides in another region, select the region in which the instance resides from the drop-down list when you manage the instance in the DMS console.

    Instance ID

    The ID of the instance. By default, the value of this parameter is set to the ID of the current ApsaraDB for SelectDB instance. You do not need to modify this parameter.

    Note

    If you want to log on to another ApsaraDB for SelectDB instance, select the ID of the instance from the drop-down list.

    Database Account

    The database account that is used to log on to the ApsaraDB for SelectDB instance.

    Database Password

    The password of the database account that is used to log on to the ApsaraDB for SelectDB instance.

    Remember password

    Specifies whether to remember the database account and password. If you select Remember password, you do not need to enter the database account and password the next time you log on to the ApsaraDB for SelectDB instance.

    Control Mode

    The mode in which the instance is managed in DMS. Valid values:

    • Flexible Management

    • Stable Change

    • Secure Collaboration

    For more information, see Control modes.

    Note
    • If you log on to the ApsaraDB for SelectDB instance by using DMS for the first time, the Control Mode parameter is set to Stable Change by default. After you log on to the instance, you can change the control mode by modifying the information about the instance. For more information, see Modify database instances and Control modes.

    • After the preceding parameters are configured, click Test Connection in the lower-left corner of the Log on to Database Instance dialog box. If the connectivity test fails, check the instance information based on the reported errors.

  6. Click Login.

    After you log on to the instance, double-click a database name in the left-side navigation pane of the DMS console to go to the SQL Console of the database and execute SQL statements on the SQLConsole tab. For more information, see Create a database and write data to the database.

FAQ

Q: What do I do if the following whitelist error message appears when I register an ApsaraDB for SelectDB instance with DMS?

设置白名单

A: You can click Configure whitelist in the dialog box. The system automatically adds the IP address of the DMS server to the whitelist of the Alibaba Cloud database instance. If the IP address fails to be automatically added to the whitelist, you need to manually add it. For more information, see Configure an IP address whitelist.