Can't run "mongosh" from your command prompt? This tutorial shows you how to fix that by adding MongoDB to your Windows PATH environment variables. This lets you run the Mongo Shell from any terminal window.
Follow these simple steps:
First, find your MongoDB "bin" folder. The default location is usually: C:\Program Files\MongoDB\Server\[YOUR_VERSION]\bin
Copy this full folder path.
Press the Windows key, type "env", and click "Edit the system environment variables".
Click the "Environment Variables..." button.
Under "System variables," find and select the "Path" variable, then click "Edit".
Click "New" and paste the "bin" folder path you copied.
Click "OK" on all the windows to save.
Important: Open a NEW Command Prompt (cmd) or Terminal window.
Just type mongosh and press Enter.
You will now be connected to your local MongoDB server!
#MongoDB #MongoShell #Windows #Database #NoSQL #Programming #HowTo #TechTips