Data Management (DMS) is an integrated 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 a standalone ApsaraDB for MongoDB instance for easy management.
Add the IP address of the DMS server (100.104.0.0/16) to the whitelist of the ApsaraDB for MongoDB instance. For more information, see Configure a whitelist for a standalone ApsaraDB for MongoDB instance.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and the region of the target instance.
- In the left-side navigation pane, click Replica Set Instances.
- Find the target instance and click its ID.
- Click Log On and select Primary or Secondary in the upper-right corner of the Basic Information page . You are redirected to the
- Primary: the primary node of the replica set instance. This node has read/write permissions on the database.
- Secondary: the secondary node of the replica set instance. This node only has read permissions on the database.
- In the DMS console, enter the following information.
Item Description Network address:Port The internal connection string of the primary node of the ApsaraDB for MongoDB instance is automatically entered. Database Username Enter the database account of the MongoDB instance. The initial account is root. Database Name Enter the name of the database to which the account belongs.Note
- If Database Username is set to root, the database name is admin.
- We do not recommend that you log on to a database as the root user in the production environment. You can create users and grant permissions based on your business needs. For more information, see Use DMS to manage ApsaraDB for MongoDB users.
Password The password of the specified account.Note If you forget the password of the root account, you can reset the password by using the method specified in Set a password.
- Click Log On.
Common connection scenarios
- Connect a local client to an ApsaraDB forMongoDB instance over the Internet
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when their network types are different
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when they are in different regions
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when they do not belong to the same Alibaba Cloud account