Update MongoDB Compass更新MongoDBCompass¶
On this page
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的早期版本。
If you are running macOS Catalina or later, you may have to modify your system settings to grant Compass permission to run. 如果您正在运行macOS Catalina或更高版本,您可能需要修改系统设置以授予Compass运行权限。For more information, see .有关详细信息,请参阅安装Compass。
Enable Automatic Updates启用自动更新¶
You can enable automatic updates to the latest version of Compass on the Help > Privacy Settings dialog.您可以在帮助中启用Compass最新版本的“自动更新”>“隐私设置”对话框。
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版或更高版本时,您需要允许访问最近和集合夹中保存的每个连接的系统存储。
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社区版迁移到Compass的全功能版本并保留任何保存的数据,如保存的连接字符串和常用查询,必须将该数据迁移到新版本的MongoDB Compass。
MongoDB Compass stores saved connections, queries, and aggregation pipelines in folders in your file system. MongoDB Compass将保存的连接、查询和聚合管道存储在文件系统的文件夹中。You can copy these folders to the corresponding folder for your upgraded Compass version to avoid recreating your saved data.您可以将这些文件夹复制到升级版Compass的相应文件夹中,以避免重新创建保存的数据。
Procedure过程¶
Download the fully-featured edition of MongoDB Compass from the downloads page.从下载页面下载全功能的MongoDB Compass版本。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
-
Copy the following folders from your Compass Community edition folder to your fully-featured Compass folder:将以下文件夹从Compass Community edition文件夹复制到功能齐全的Compass文件夹:Connections
FavoriteQueries
RecentQueries
SavedPipelines
The fully-featured Compass folder is located in the same directory as your Compass Community edition folder.功能齐全的Compass文件夹与Compass Community edition文件夹位于同一目录中。 Launch the fully-featured edition of MongoDB Compass.推出功能齐全的MongoDB Compass版本。