Docs Menu
Docs Home
/
MongoDB Compass
/ /

Advanced Connection Tab

On this page

  • Procedure

The Advanced connection tab provides additional connection options for your deployment. These options can be used with the General, Authentication, TLS / SSL, and Proxy / SSH Tunnel connection options.

1

In the bottom panel of the Connections Sidebar, click Add New Connection to open the New Connection modal.

If you already have connections listed in the Connections Sidebar, click the icon on the top right of the sidebar to open the New Connection modal.

2
New Advanced Connection Options
click to enlarge
3

(Optional) Select a Read Preference from the following options:

Read Preference
Description
Primary
Default mode. All operations read from the current replica set primary. If the primary is unavailable, the operation fails.
Primary Preferred
Operations read from the primary unless the primary is unavailable. If the primary is unavailable, operations read from secondary members.
Secondary
All operations read from the secondary members of the replica set. If the secondary is unavailable, the operation fails.
Secondary Preferred
Operations read from the secondary unless the secondary is unavailable. If the secondary is unavailable, operations read from the primary on sharded clusters.
Nearest

Operations read from a random eligible replica set member, irrespective of whether that member is a primary or secondary, based on a specified latency threshold. The operation considers the following when calculating latency:

  • The localThresholdMS connection string option.

  • The maxStalenessSeconds read preference option.

  • Any specified tag sets.

Tip

See also:

Field
Description
Replica Set Name
(Optional) Name of replica set.
Default Authentication Database
(Optional) Authentication database used when authSource is not specified. For more information, see Authentication Options.
URI Options
Additional options to customize your connection. You specify these options as key-value pairs, and Compass automatically adds the key-value pairs to the connection string. For more information, see Connection String Options.
4

Tip

See also:

To disconnect from your deployment, see Disconnect from MongoDB.

Back

In-Use Encryption

On this page