Favorite Connections连接收藏夹¶
On this page
Compass allows you to save MongoDB connection configurations to easily reconnect to the same MongoDB deployment using the same specifications.Compass允许您保存MongoDB连接配置,以便使用相同的规范轻松地重新连接到相同的MongoDB部署。
Save a Favorite Connection保存收藏夹连接¶
You can save a favorite connection from the initial connect screen, or after you have successfully connected to a MongoDB deployment.您可以从初始连接屏幕或在成功连接到MongoDB部署后保存收藏夹连接。
Save from Connect Screen从连接屏幕保存¶
Configure your connection form with a connection you would like to save.使用要保存的连接配置连接表单。¶
Click Favorite at the top of the form.单击表单顶部的“收藏夹”。¶

Enter a name for this favorite connection.输入此收藏夹连接的名称。¶

(Optional) Select a color for your favorite to more easily identify the favorite connection.为收藏夹选择一种颜色,以便更轻松地识别收藏夹连接。¶
Click Save.单击“保存”。¶
Save after Connecting to a Deployment连接到部署后保存¶
Click Favorite on the left navigation panel.单击左侧导航面板上的收藏夹。¶

Enter a name for this favorite connection.输入此收藏夹连接的名称。¶

(Optional) Select a color for your favorite to more easily identify the favorite connection.为收藏夹选择一种颜色,以便更轻松地识别收藏夹连接。¶
Click Save.单击“保存”。¶
Once you save your favorite connection, Compass displays the connection in the Favorites section of the left navigation panel.保存“收藏夹”连接后,Compass会在左侧导航面板的收藏夹部分显示该连接。

Edit a Favorite Connection编辑收藏夹连接¶
Click the desired connection under Favorites in the left navigation panel.在左侧导航面板的“收藏夹”下单击所需的连接。¶

To Copy or Remove a Favorite Connection, hover over the target connection and click the button.要复制或删除收藏夹连接,请将鼠标悬停在目标连接上,然后单击按钮。
Copying a connection creates another Favorite Connection with the same configuration.复制连接将创建另一个具有相同配置的收藏夹连接。Removing a connection deletes that Favorite Connection.删除连接将删除该收藏夹连接。
Make the desired changes to the connection configuration within the form.对表单中的连接配置进行所需的更改。¶
When you make any change to a connection, a dialog will appear at the bottom of the form with options Discard and Save Changes.对连接进行任何更改时,表单底部将显示一个对话框,其中包含“放弃”和“保存更改”选项。
Click Save Changes.单击“保存更改”。¶
Delete a Favorite Connection删除收藏夹连接¶
Click the desired connection under Favorites in the left navigation panel.在左侧导航面板的“收藏夹”下单击所需的连接。¶
Click the button on the connection.单击连接上的按钮。¶

Compass displays a dropdown menu with options Copy and Remove.Compass显示一个下拉菜单,其中包含“复制”和“删除”选项。
Click Remove from the dropdown menu.从下拉菜单中单击“删除”。¶
Compass removes the connection from the Favorites list and returns the New Connection form to the default state.Compass从“收藏夹”列表中删除连接,并将“新建连接”表单返回到默认状态。
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.如果在KDE Linux上运行MongoDB Compass,则必须安装GNOME密钥环才能成功加载保存的连接。The Electron module Keytar uses GNOME Keyring to securely store the database credentials for your connections.Electron模块Keytar使用GNOME密钥环安全地存储连接的数据库凭据。