Docs HomeMongoDB Compass

Import Saved Connections in Compass在Compass中导入保存的连接

You can import saved connections in MongoDB Compass. 您可以在MongoDB Compass中导入保存的连接。This lets you use saved connections from other workspaces or connections used by other team members.这使您可以使用其他工作区中保存的连接或其他团队成员使用的连接。

Prerequisite先决条件

Before you import saved connections, you must export the connections.在导入保存的连接之前,必须导出连接

Procedure过程

To import saved connections from a JSON file into Compass:要将保存的连接从JSON文件导入Compass,请执行以下操作:

1

On the Connect screen, hover over Saved Connections in the left-side navigation and click the Ellipses (...) button.在“连接”屏幕上,将鼠标悬停在左侧导航中的“保存的连接”上,然后单击省略号()按钮。

2

Select Import saved connections.选择“导入保存的连接”。

3

Under Source File, click Select a file.在“源文件”下,单击“选择文件”。

4

Select the exported JSON file you want to import.选择要导入的导出JSON文件。

5

If your file is encrypted with a password, enter the passphrase under Decryption Password.如果您的文件是用密码加密的,请在“解密密码”下输入密码短语。

6

Select the connection names you want to import.选择要导入的连接名称。

If the connection name already exists under your saved connections, Compass overwrites the existing connection with the imported connection.如果保存的连接下已经存在连接名称,Compass将用导入的连接覆盖现有连接。

7

Click Import.单击“导入”。

Results结果

After the connections are imported, they appear on the left-side navigation of the Connect screen under Saved Connections.导入连接后,它们将显示在“连接”屏幕左侧导航的“已保存的连接”下。