Instagram
youtube
Facebook
Twitter

Connect to MongoDB

Connect to MongoDB

  • When you open Compass, an initial connection dialog appears:

You can connect  by either:

  • Providing your connection string.

  • Specifying Advanced Connection Options.

Paste Connection String

  • Paste your connection string.

  • Click on Connect button and it navigates to the compass home page.

Advanced Connection Options

  • General
  • Authentication
  • TLS/SSL
  • Proxy/SSH
  • In-Use Encryption
  • Advanced

General

  • Click on Advanced Connection options.
  • Click on the General tab.
  • Select a connection string scheme: mongodb and mongodb+srv.
  • Enter a Hostname and enable the direct connection.
  • Click on Connect button and it navigates to the compass home page.

Authentication Connection Tab

  • Click Advanced Connection Option.

  • Click the  Authentication Tab.

  • Select your Authentication method: Username/Password, X.509, Kerberos, LDAP, and AWS IAM.

        Username

        Password

        (Optional) Authentication Database

        Authentication Mechanism:

         The Default setting selects the first authentication mechanism supported by the server according to an order of preference.

         With the Default setting, MongoDB tries to authenticate using the following mechanisms in the order they are listed:

         SCRAM-SHA_256

         SCRAM-SHA-1

          MONGODB-CR

  • For advanced connection configuration options, click the Advanced tab.

  • Click on Connect button and it navigates to the compass home page.

TLS/SSL

  • Click Advanced Connection Option.

  • Click the  TLS/SSL Tab.

  • You can leave TLS unset with the Default option or set the TLS / SSL connection On or Off.

  • For advanced connection configuration options, click the Advanced tab.

  • Click on Connect button and it navigates to the compass home page.