Docs HomeMongoDB Compass

Update MongoDB Compass更新MongoDB Compass

To ensure that you are using the latest Compass features and improvements, it is recommended to use the latest version of MongoDB Compass . 为了确保您使用最新的Compass功能和改进,建议使用最新版本的MongoDB Compass。To upgrade Compass , you can either manually install the latest version or enable automatic updates.要升级Compass,您可以手动安装最新版本,也可以启用自动更新。

Manually Install the Latest Version of Compass手动安装最新版本的Compass

You can download and install the latest version of Compass from the MongoDB Downloads page at any time. 您可以随时从MongoDB下载页面下载并安装最新版本的Compass。Check the Software Requirements for your operating system and desired version of Compass to ensure Compass is compatible with your system. 检查您的操作系统和所需版本的Compass的软件要求,以确保Compass与您的系统兼容。You do not need to uninstall previous versions of Compass to upgrade.您不需要卸载以前版本的Compass即可升级。

Note

If you are running macOS Catalina or later, you may have to modify your system settings to grant Compass permission to run. For more information, see Install Compass. 如果您正在运行macOS Catalina或更高版本,您可能需要修改系统设置才能授予Compass运行权限。有关详细信息,请参阅安装Compass

Enable Automatic Updates启用自动更新

You can enable automatic updates to the latest version of Compass in the Privacy section of the MongoDB Compass > Settings dialog.您可以在MongoDB Compass>“设置”对话框的隐私部分启用对最新版本Compass的自动更新。

Privacy settings

MongoDB Compass does not install any updates without your explicit permission.未经您的明确许可,MongoDB Compass不会安装任何更新。Instead, Compass prompts you to upgrade when a new version is available.相反,Compass会在新版本可用时提示您进行升级。

Allow Keychain Access for Recent and Favorite Connections允许对最近的连接和收藏夹连接进行钥匙链访问

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或更高版本时,您需要允许访问Recents和Favorites中每个保存的连接的系统存储。

When prompted for your keychain password, click Always Allow to prevent being prompted for your password in the future. 当系统提示您输入钥匙链密码时,请单击“始终允许”以防止将来出现提示您输入密码的情况。This ensures MongoDB Compass has access to your saved connections when updating to new versions.这确保MongoDB Compass在更新到新版本时可以访问您保存的连接。

Migrate to Compass from Compass Community从Compass社区迁移到Compass

To migrate from Compass Community edition to the fully-featured edition of Compass and retain any saved data such as saved connection strings and favorite queries, you must migrate that data to your new edition of MongoDB Compass .要从Compass Community版本迁移到Compass的全功能版本并保留任何保存的数据,如保存的连接字符串和喜爱的查询,您必须将这些数据迁移到新版本的MongoDB Compass。

MongoDB Compass stores saved connections, queries, and aggregation pipelines in folders in your file system. You can copy these folders to the corresponding folder for your upgraded Compass version to avoid recreating your saved data.MongoDB Compass将保存的连接、查询和聚合管道存储在文件系统中的文件夹中。您可以将这些文件夹复制到升级后的Compass版本的相应文件夹中,以避免重新创建保存的数据。

Procedure过程

  1. Download the fully-featured edition of MongoDB Compass from the downloads page .下载页面下载MongoDB Compass的全功能版本。
  2. Refer to the following table to see where your MongoDB Compass data is stored based on your operating system:请参阅下表,查看基于操作系统的MongoDB Compass数据存储位置:

    Operating System操作系统Data Location数据位置
    macOS~/Library/Application Support/MongoDB Compass Community
    Windows%APPDATA%/MongoDB Compass Community
    LinuxOne of either:其中之一:

    • $XDG_CONFIG_HOME/MongoDB Compass Community/
    • ~/.config/MongoDB Compass Community
  3. Copy the following folders from your Compass Community edition folder to your fully-featured Compass folder:将以下文件夹从Compass社区版文件夹复制到功能齐全的Compass文件夹中:

    • Connections
    • FavoriteQueries
    • RecentQueries
    • SavedPipelines

    The fully-featured Compass folder is located in the same directory as your Compass Community edition folder.功能齐全的Compass文件夹与Compass社区版文件夹位于同一目录中。

  4. Launch the fully-featured edition of MongoDB Compass .推出功能齐全的MongoDB Compass版本。