Docs Home / Compass / Connect / Favorite Connections / Import & Export

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

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

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.导入连接后,它们会出现在“连接”屏幕的左侧导航中的“已保存的连接”下。