0 votes
1 view
in Web Technology by (32.3k points)

When I write mongo for switching to the database, it is throwing me the error as:

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

I am not able to understand why it is giving me the error as my mongo shell is connected to the database and I have also inserted 2 documents.

1 Answer

0 votes
by (71.3k points)

I think you have not added your mongo.exe to the PATH. Refer to the following steps for adding to the path:

  1. Find your installed MongoDB bin folder and then copy your bin folder path.
  2. Then go to My Computer then Properties then Advanced system settings then Environment Variables then System variables then see for "Path". Then click on Edit then click on New. There you have to paste your copied path to the MongoDB bin folder.
  3. Then at last just restart your mongo shell.
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...