This topic describes how to enable or disable password-free access over a VPC for an ApsaraDB for MongoDB instance. This makes database connections easy and secure. After password-free access is enabled, the ECS instance that shares the same VPC with the ApsaraDB for MongoDB instance can connect to a database of this ApsaraDB for MongoDB instance without a password. You can still use a database username and its password to connect to this database.
Prerequisites
- The instance is a replica set or sharded cluster instance.
- The database version of the instance is 4.0 (with the minor version of mongodb_20190408_3.0.11
or later). If the version is earlier than the required version, upgrade the instance.
For more information, see Upgrade MongoDB versions and Upgrade the minor version of an ApsaraDB for MongoDB instance.
Note You can view the database version and the minor version on the Basic Information page in the ApsaraDB for MongoDB console.
- The instance is in a VPC. If the network type is Classic Network, switch it to VPC. For more information, see Switch from Classic Network to VPC.
Procedure
Related operations
Operation | Description |
---|---|
ModifyInstanceVpcAuthMode | Enables or disables password-free access over a VPC for an ApsaraDB for MongoDB instance. |