Add MongoDB to the Path
To add MongoDB to the PATH, please perform the following steps:
- Go to the location where MongoDB was installed. For e.g., C:\Program Files\MongoDB
- Inside MongoDB, go to folder\Server\8.0\bin
- Go to Control Panel System and Security Security
- Select Advanced System Settings, click Environment Variables. This will open a new dialog box.
- 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
- 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.
- 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.)