对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

使用私有端点连接到MongoDB SQL接口

本页介绍如何通过私有端点连接到MongoDB SQL接口。使用哪个端点取决于连接方式:

  • 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.

  • 运行 MongoDB 5.0 或更高版本的 Atlas 集群。

  • 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. 如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含项目的组织。

  2. 如果尚未显示,请从导航栏的 Projects 菜单中选择您的项目。

  3. 在侧边栏中,单击 Services 标题下的 Data Federation。

显示Data Federation 页面。

2
3
  1. 从 Choose private endpoint 下拉列表中选择您的联合数据库实例私有端点。

  2. 此端点在名称中包含“Data Federation”,有别于与Atlas 集群关联的“专用”端点。

4
5
6

确认 URL字段中提供的连接字符串包含字符 pl,这表示专用链接。

专用集群使用标准Atlas 集群私有端点。 SQL接口不需要单独的端点,也不需要特定于SQL接口的配置。

要通过私有端点连接,请执行以下操作:

1

To learn how, see Configure Private Endpoints.

3

在 Connect 中,单击 Atlas SQL,选择您的驾驶员,然后复制 Connection URL。当集群使用私有端点时,连接字符串会反映该端点。