Your first connection

Save a MongoDB connection in the Connection Manager, test it and open it.

A connection is a saved set of settings (server address, authentication, TLS, tunnel) with a name. You create it once in the Connection Manager, then open it with one click whenever you need it. Opening a connection never changes anything on the server.

The Connection Manager with three saved connections and a Staging folder

Create a connection from a connection string

This is the fastest way when you already have a mongodb:// or mongodb+srv:// string.

  1. Click Connect in the Global Toolbar, or press Ctrl+N. The Connection Manager opens.
  2. Click New connection. The New Connection wizard opens.
  3. Keep Paste your connection string (SRV or standard) here: selected and paste the string into URI:, for example mongodb://localhost:27017/acme_store.
  4. If the string names a user but no password, type the password in Database user password:, or leave it empty to be asked at each connect.
  5. Click Next. The app reads the string and tells you the connection has been successfully auto-configured. Click OK.
  6. The connection dialog opens with every field filled in from the string. Type a Connection name:, for example ACME Store (local).
  7. Click Test Connection to check the settings without saving them.
  8. Click Save. The connection appears in the list.

Create a connection by hand

  1. In the wizard, choose Manually configure my connection settings and click Next.
  2. On the Server tab, set the connection type, host and port (the defaults are a standalone server on localhost, port 27017).
  3. Fill in the other tabs only if you need them (see the reference table).
  4. Type a Connection name:, click Test Connection, then Save.

Open the connection

  1. In the Connection Manager, select the connection.
  2. Click Connect, or double-click the connection.
  3. A Connecting box lists each step of opening the connection with its status. When it succeeds, the Connection Manager closes and the connection appears in the Open connections tree.

Continue with Your first query.

Reference: the connection dialog tabs

TabWhat you set thereMore
ServerConnection type (Standalone, Replica Set, Sharded Cluster, DNS Seedlist), hosts and ports, and the Read-Only Lock checkboxTopologies
AuthenticationNone, Basic (SCRAM-SHA-256), Legacy (SCRAM-SHA-1), X.509, Kerberos (GSSAPI), LDAP (PLAIN), AWS, MongoDB OIDCAuthentication
SSLTLS on or off, your own root CA file, client certificate, trust settingsTLS
SSHAn SSH tunnel to reach a server behind a bastion hostSSH tunnels
ProxyDirect, the application’s default proxy, or a custom HTTP or SOCKS proxyProxies
MongoDB ToolsOptions for the dump and restore tools on this connection
IntelliShellOptions for IntelliShell on this connectionIntelliShell
AdvancedRead preference and other connection optionsTopologies

Reference: the Connection Manager

ItemWhat it does
New connection, New folder, Edit, Delete, DuplicateManage saved connections and the folders that group them
ImportBring in connections from a URI file or other MongoDB tools’ connection files (Import connections)
To URIShow the selected connection as a connection string
Columns: Name, DB Server, Security, Last Accessed, ShortcutClick a column header to sort the list
Filter fieldNarrows the list and shows the number of matches
Show on startupOpens the Connection Manager every time the application starts

Tips

  • Passwords are not written to the connection file: they go to the protected store you chose at first launch.
  • Use folders to separate environments (for example Production and Staging); see Folders.
  • Tick Read-Only Lock on the Server tab for connections to production data so nothing can be written by mistake; see Read-only connections.
  • Your first connections also appear under Recent Connections on the Quickstart page and in the arrow menu of the Connect toolbar button.

Troubleshooting

SymptomCause and fix
Next shows an error under the URIThe string does not start with mongodb:// or mongodb+srv://, or is malformed. Fix it, or configure the connection by hand.
Save is greyedA required field is missing: the connection name, or a field on a tab shown in red (for example a user name for Basic authentication).
The Connecting box ends with FAILEDClick Show details to see which step failed and the server’s message. You can copy the error, or ask the AI Helper about it if you set one up.
Authentication failsCheck the user, password and authentication database on the Authentication tab.
Timeout on a server behind a firewallUse an SSH tunnel or a proxy.
The server is older than 4.2See Older servers: such servers are reached through a local relay and without TLS.