'mongo' is not recognized as an internal or external command, operable program or batch file

Hello People,

I have installed mongo shell and created the mongo cluster too. The bin path for mongo shell has also been set up in environment variables. But when I am trying to execute the command for connecting sandbox cluster to mongo shell…i get the below output

C:\Users\Asus>mongo “mongodb+srv://sandbox-sbrkk.mongodb.net/test” --authenticationDatabase admin --username m001-student
‘mongo’ is not recognized as an internal or external command,
operable program or batch file.

Kindly help

Hi @Gaurav_65978,

Please navigate to the bin directory inside the MongoDB server directory and run the mongo --nodb command from there and share the output.

If it works then your path was not set correctly. Please share a screenshot of it as well.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

At your Windows prompt

please run the command

echo %Path%
1 Like

Hello Shubham,

Path has been set and executed the way you told me still the same output

E:\mongodb-linux-x86_64-ubuntu1804-4.2.3\bin>mongo --nodb
‘mongo’ is not recognized as an internal or external command,
operable program or batch file.

Hello Steeve,

E:>
E:>echo %Path%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\MinGW\msys\1.0\bin;E:\Course\bin;C:\WINDOWS\System32\OpenSSH;E:\mongodb-linux-x86_64-ubuntu1804-4.2.3\bin;C:\Users\Asus\AppData\Local\Microsoft\WindowsApps;

That’s a weird path. Could you run the command dir to see what is in there? I suspect you installed the linux version rather than the windows version.

Hi Steeve,

Yes you are correct…Thats a silly mistake
I didn’t see the file correctly .

Will try again

Hi Steeve,

CA you help me with mongo shell for windows…where can I get it ?

Do I need to build the new cluster setup for windows on atlas ? or what is the procedure

It is all there in Chapter 2 - Installing the mongo shell (Windows).

Your cluster is fine.