Docs Home / Compass / Connect

Favorite Connections收藏的连接

Compass allows you to save MongoDB connection configurations to easily reconnect to the same MongoDB deployment using the same specifications.Compass允许您保存MongoDB连接配置,以便使用相同的规范轻松重新连接到相同的MongoDB部署。

Note

Starting in version 1.39.2, MongoDB Compass no longer supports migrating from legacy connection files that pre-date version 1.31.0. Legacy connections refer to an internal Compass connection-options format that is stored on disk and no longer supported after version 1.39.0.从版本1.39.2开始,MongoDB Compass不再支持从版本1.31.0之前的旧连接文件迁移。传统连接是指存储在磁盘上的内部Compass连接选项格式,在版本1.39.0之后不再受支持。

If you have legacy connections saved in your favorites, export the connections on version 1.39.0 to convert them into the new format before updating to version 1.39.2 or later.如果您的收藏夹中保存了旧连接,请在更新到1.39.2或更高版本之前,导出1.39.0版本的连接以将其转换为新格式。

Save a Favorite Connection保存“收藏夹连接”

You can save a favorite connection from the New Connection Modal or after you successfully connect to a MongoDB deployment.您可以从新连接模式或成功连接到MongoDB部署后保存最喜欢的连接。

Save from New Connection Modal从“新连接模式”保存

1

Configure your connection form with a connection you would like to save.使用要保存的连接配置您的连接表单。

2

Click the Favorite this connection box at the bottom of the form.单击表单底部的“收藏此连接”框。

3

(Optional). Enter a name for this favorite connection.(可选)。输入此收藏夹连接的名称。

4

(Optional) Select a color for your favorite to more easily identify the favorite connection.(可选)为您的收藏夹选择一种颜色,以便更容易识别收藏夹连接。

5

Click Save or Connect.单击“保存”或“连接”。

Save after Connecting to a Deployment连接到部署后保存

1

Click the next to the connection name.单击连接名称旁边的星号。

2

Click the Favorite option in the menu.单击菜单中的“收藏夹”选项。

Considerations注意事项

  • On macOS systems, the first time that you update MongoDB Compass to version 1.20 or later, you will need to allow access to your system storage for each saved connection in Recents and Favorites. 在macOS系统上,当您第一次将MongoDB Compass更新到1.20或更高版本时,您需要允许在“最近使用”和“收藏夹”中为每个保存的连接访问您的系统存储。To learn more, see Allow Keychain Access for Recent and Favorite Connections.要了解更多信息,请参阅允许最近和收藏夹连接的钥匙串访问
  • If you run MongoDB Compass on KDE Linux, you must have GNOME Keyring installed to successfully load saved connections. The Electron module Keytar uses GNOME Keyring to securely store the database credentials for your connections.如果您在KDE Linux上运行MongoDB Compass,则必须安装GNOME键环才能成功加载保存的连接。Electron模块Keytar使用GNOME Keyring安全地存储连接的数据库凭据。