Add MongoDB to the Path

To add MongoDB to the PATH, please perform the following steps:

  1. Go to the location where MongoDB was installed. For e.g., C:\Program Files\MongoDB
  2. Inside MongoDB, go to folder\Server\8.0\bin
  3. Go to Control Panel System and Security Security
  4. Select Advanced System Settings, click Environment Variables. This will open a new dialog box.
  5. Select the Variable Path in System Variables and click on the New button to add the path of MongoDB. For example - C:\Program Files\MongoDB\Server\8.0\bin
  6. Similarly, Add the path for MongoDB Shell mongosh, Inside MongoDB location go to folder\mongosh\bin and add the path to System variables Path. For e.g. C:\Program Files\MongoDB\mongosh\bin, refer to the screenshot below for reference.
  7. Similarly, Add the path for MongoDB Tools, Inside MongoDB location go to folder\Tools\100\bin and add the path to System variables Path. For e.g . C:\Program Files\MongoDB\Tools\100\bin, refer to the screenshot below for reference.
    Figure 1. MongoDB Installation - Enterprise Version (non-HA) (Cont.)
    A screenshot of a computer program Description automatically generated