Docs Menu
Docs Home
/
MongoDB Database Tools
/

Installing the Database Tools on macOS

On this page

  • Overview
  • Compatibility
  • Installation

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.

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:

Note

Quick links to older documentation

MongoDB Database Tools version 100.10.0 supports the following versions of the MongoDB server:

  • MongoDB 8.0

  • MongoDB 7.0

  • MongoDB 6.0

  • MongoDB 5.0

  • MongoDB 4.4

  • MongoDB 4.2

While the tools may work on earlier versions of MongoDB server, any such compatibility is not guaranteed.

The MongoDB Database Tools version 100.10.0 are supported on macOS 10.12 or later.

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:

Note

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
1

macOS does not include the Homebrew brew package by default. Install brew using the official Homebrew installation instructions.

2

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
3

In your macOS Terminal, run the following command to install the MongoDB Database Tools:

brew install mongodb-database-tools

Tip

Once installed, you can later update the Database Tools with:

brew upgrade mongodb-database-tools
4

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.

1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select the macOS x86_64 Platform

  2. Select the zip Package

  3. Click the Download button

2

You can either:

  • Double-click the downloaded Zip archive to unpack it.

  • In your MacOS Terminal, navigate to the directory containing the downloaded Zip archive, then run the following command:

    unzip mongodb-database-tools-*-100.10.0.zip
3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command line by name, without needing to specify its full path, or first navigating to its parent directory.

You can either:

  • Copy the DB Tools binaries into a directory listed in your PATH variable, such as /usr/local/bin. Run the following command from the directory containing the DB Tools binaries:

    sudo cp * /usr/local/bin/
  • Add the DB Tools installation directory to your PATH, by editing your shell's configuration file. For example, in bash, you would edit the ~/.bash_profile file.

Back

Install on Linux