Mongo command not working

I am getting the below error message when running the mongo command from the cmd in windows 10.
mongo%20cmd

The mongo application is in the below file path:
File%20Path%20n

I have also added the file path to the environment variable:
system%20variable

why am i getting the errror?

@Philip_43166,
First you have to start mongodb service by enterring mongod in one terminal and then in another terminal you can start by entering “mongo” as you did in the post.

Hi Suresh,

Thanks for your reply.

I tried entering mongod in the terminal just now but I am getting the same error message.

Any more suggestions?

Thanks

Could you please provide the env path and full error screenshots…so that we can find the exact issue?
There might be two issues:
1: You have to run first mongod and mongo from the exac installed path ( from two shell terminals) when the evn variable is not set .
2. There might be an issue while adding the env variable?..please also check this and provide the details required to know the exact cause.

Hi Suresh,

I am after changing the cd on the cmd terminal and run mongod in one cmd and then run mongo from the exact file path on another cmd and this time I have no error (previously I did not change the cd in the cmd).

Where can I now find the Mongo Shell?

Thanks,

Phil

1 Like

Thats great to here…
The cmd terminal after connecting to mongo is called mongo Shell or simply Shell.

Ok thanks.

I don’t see it appear when I search for mongo she’ll in the search bar. Is there somewhere else I need to look?

Nothing else… please continue your learning. Good Luck.

Ok. But after running both mongod and mongo in two separate cmd’s where do I find the mongo shell? Or is it the car that my cmd is now a mongo shell after running both commands?

@Phiiiil_57478,

As I already told you, the shell you enter after entering “mongo” in the terminal is called Shell or Mongodb shell… There is nothing else to find.

so my cmd prompt is now the mongo shell as opposed to the mongo shell being a separate application?

Yes you are correct.

thanks for your help!

In the Lecture called Loading Data into your sandbox cluster the lecturer says that we can open the mongo shell from with the folder loadMovieDetailsDataset. In order to do so do I need to copy and paste the mongo application into this folder? I am only able to open mongo shell from the folder the application is stored in.

No
What they meant is you have to be in the dir where file resides
Then start mongo shell being in that dir and run load command
You don’t have to copy any software

ok, however when I try to start the mongo shell from any directory apart from the directory that has the mongo application saved in it i get this error:
‘mongo’ is not recognized as an internal or external command, operable program or batch file.

@Philip_43166,

You can connect atlas link from any where thats not a problem.
Please make sure to follow the video and the notes in details to perform the concerned steps in your shell.