Installing the Database Tools on macOS¶
Overview¶
The MongoDB Database Tools are a suite of command-line utilities for working with MongoDB. Use this guide to install the Database Tools on the macOS platform.
Versioning¶
Starting with MongoDB 4.4, the MongoDB Database Tools are now released separately
from the MongoDB Server and use their own versioning, with an initial
version of 100.0.0
. Previously, these tools were released
alongside the MongoDB Server and used matching versioning.
For documentation on the MongoDB 4.2 or earlier versions of these tools, reference the MongoDB Server Documentation for that version of the tool:
Compatibility¶
MongoDB Server Compatibility¶
MongoDB Database Tools version 100.3.1
supports the following versions
of the MongoDB server:
- MongoDB 4.4
- MongoDB 4.2
- MongoDB 4.0
- MongoDB 3.6
While the tools may work on earlier versions of MongoDB server, any such compatibility is not guaranteed.
Platform Support¶
The MongoDB Database Tools version 100.3.1
are supported on macOS 10.12 or
later.
Installation¶
The MongoDB Database Tools can be installed with the third party Homebrew package
manager, or downloaded as a .tgz
archive. Select the tab below
depending on your desired installation method:
Starting with MongoDB 4.4.1, installing the MongoDB Server via Homebrew also installs the Database Tools. The following command will determine if the Database Tools are already installed on your system:
brew list | grep mongodb-database-tools
Install Homebrew.¶
macOS does not include the Homebrew brew
package by default.
Install brew
using the official
Homebrew installation instructions.
Tap the MongoDB formula.¶
In your macOS Terminal, run the following command to download the official MongoDB Homebrew formulae for MongoDB and the Database Tools:
brew tap mongodb/brew
Install the MongoDB Database Tools.¶
In your macOS Terminal, run the following command to install the MongoDB Database Tools:
brew install mongodb-database-tools
Once installed, you can later update the Database Tools with:
brew upgrade mongodb-database-tools
Run the installed Tools.¶
Once installed, you can run any of the Database Tools directly from your macOS Terminal. Consult the reference page for the specific tool you wish to use for its full syntax and usage.