MongoDB V2 Connector > Connections for MongoDB V2 > Connect to MongoDB
  

Connect to MongoDB

Let's configure the MongoDB V2 connection properties to connect to MongoDB.

Before you begin

Before you configure a MongoDB V2 connection, ensure that you have a MongoDB user account with admin privileges. You also need to copy the host name of the primary node in MongoDB and keep it handy for your connection configuration.

Connection details

The following table describes the basic connection properties:
Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Description
Description of the connection. Maximum length is 4000 characters.
Type
MongoDB V2
Runtime Environment
Name of the runtime environment where you want to run tasks.
Select a Secure Agent or a serverless runtime environment¹.
Host
Node name or IP address of the primary shard in the MongoDB cluster.
Service Record Lookup Enabled
Allows the connector to query the DNS to discover all the available MongoDB servers in the MongoDB cluster. You can enable this property when the host name is associated with a DNS SRV record.
With this property enabled, you do not need to specify a port, as the DNS record provides all the required details.
If you don't enable this property, manually specify the host name and port for the MongoDB server in your connection properties.
Port
MongoDB server port number.
Default is 27017.
¹ Applies only to mappings in advanced mode.

Authentication types

You can configure username and password and X.509 authentication types to access MongoDB.
Select the required authentication type and then configure the authentication-specific parameters.

Related links