For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
See how MongoDB 9.0 delivers up to 2x higher throughput.
MongoDB Branding Shape
Register now >
Docs Menu

Connect to the MongoDB SQL Interface with a Private Endpoint

This page describes how to connect to the MongoDB SQL Interface over a private endpoint. Which endpoint you use depends on how you connect:

  • On a dedicated cluster, the SQL Interface uses the standard Atlas cluster private endpoint, with no SQL Interface-specific configuration. To configure one, see Configure Private Endpoints.

  • Through a federated database instance, the SQL Interface uses a Atlas Data Federation private endpoint, which is distinct from the cluster endpoint. MongoDB supports AWS and Microsoft Azure private endpoints for federated database instances. To learn more, see Set Up a Private Endpoint for a Federated Database Instance.

  • An Atlas cluster running MongoDB version 5.0 or later.

  • An AWS or Azure private endpoint configured in your federated database instance.

Follow these steps to connect your Atlas cluster to the SQL Interface using a federated database instance private endpoint.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Data Federation under the Services heading.

The Data Federation page displays.

2
3
  1. Select your Federated Database Instance private endpoint from the Choose private endpoint dropdown.

  2. This endpoint includes "Data Federation" in the name and is distinct from a "Dedicated" endpoint associated with your Atlas cluster.

4
5
6

Confirm that the provided connection string in the URL field contains the characters pl, which indicates a private link.

A dedicated cluster uses the standard Atlas cluster private endpoint. The SQL Interface requires no separate endpoint and no SQL Interface-specific configuration.

  • A dedicated cluster, M10 and above, running MongoDB 6.0 or later.

  • A MongoDB database user with which to connect.

To connect over a private endpoint:

1

To learn how, see Configure Private Endpoints.

2

To learn how, see SQL Interface Server Setup.

3

From Connect, click Atlas SQL, select your driver, and copy the Connection URL. When the cluster uses a private endpoint, the connection string reflects that endpoint.