All Products
Document Center

ApsaraDB for MongoDB:Connect to an ApsaraDB for MongoDB sharded cluster instance by using DMS

Last Updated:Aug 14, 2023

Data Management (DMS) is an integrated and visualized database solution that offers data management, structure management, user authorization, security auditing, data trend analysis, data tracking, BI charts, performance optimization, and server management. You can use DMS to connect to ApsaraDB for MongoDB instances for remote access and online management.


Add the IP addresses of the DMS server to a whitelist of the ApsaraDB for MongoDB instance based on the network type of the instance. For more information, see Configure a whitelist for an ApsaraDB for MongoDB instance.


Skip this step if you have added the IP addresses of the DMS server to a whitelist of the ApsaraDB for MongoDB instance.

Figure 1: IP addresses available for the DMS server

Network type of the ApsaraDB for MongoDB instance

IP address of the DMS server

Virtual Private Cloud (VPC)

Classic network


  1. Log on to the ApsaraDB for MongoDB console .

  2. In the left-side navigation pane, click Sharded Cluster Instances.

  3. In the upper-left corner of the page, select the resource group and region to which the instance belongs.

  4. Click the ID of the instance that you want to manage or click Manage in the Actions column.

  5. In the upper-right corner of the page that appears, click Log On and select the ID of a mongos node. Then, you are redirected to the DMS page.

  6. In the Log on to Database Instance dialog box, configure the parameters described in the following table.



    Database Type

    The engine of the database. By default, the engine of the database to be connected is selected.

    Instance Region

    The region in which the instance is deployed. By default, the region of the current instance is selected.

    Connection string address

    The endpoint of the instance. By default, the endpoint of the current instance is displayed.

    Database Name

    The name of the authentication database in which the database account is created.

    • If the Database Account parameter is set to root, the database name is admin.

    • We recommend that you do not log on to a database as the root user in the production environment. You can create users and grant permissions to them based on your requirements. For more information, see Manage the permissions of MongoDB database users.

    Database Account

    The account that is used to access the database. The initial account is root.

    Database password

    The password that is used to access the database.


    If you forget the password of the root account, you can reset the password by using the method described in the (Optional) Reset a password section of this topic.

    Control Mode

    The mode that you use to manage the instance. Select a mode based on your business requirements. For more information, see Control modes.

  7. In the lower-left corner of the Log on to Database Instance dialog box, click Test connection.


    If the message indicating that the connection is successful appears, the values of the parameters are valid. Otherwise, troubleshoot the issue and modify the parameter settings until the test connection is successful.

  8. Click Login.


    If you want the browser to save the password, select Remember password and then click Login.

Common connection scenarios