Add MongoDB to the Path
To add MongoDB to the Environmental System variable PATH, please perform the following steps:
- Go to the location where MongoDB zip file was extracted. For e.g., C:\Program Files\MongoDB . Or E:/MongoDB
- Inside MongoDB, go to folder\Server\8.0\bin .
- Go to Control Panel System and Security System. Select Advanced System Settings and click Environment Variables. This will open a new dialog box.
- Select the variable Path in System Variables and add click on New button to add path of MongoDB. For e.g. - C:\Program Files\MongoDB\Server\8.0\bin .
- Similarly, Add the path for MongoDB Shell mongosh, go to folder\mongosh\bin and add the path to System variables Path. For e.g. C:\Program Files\MongoDB\mongosh\bin
- Similarly, Add the path for MongoDB Tools, go to
folder\Tools\100\bin
and add the path to System variables Path. For e.g
. C:\Program Files\MongoDB\Tools\100\bin
Figure 1. MongoDB Installation - Community Version (non-HA) (Cont.)