How can I troubleshoot the issue of Mongo’ is not recognized as an internal or external command, operable program, or batch file?

I am a developer and currently I am working on a project using MongoDB. During the process when I was trying to run a script for starting the MongoDB server, I encountered an error message which was showing “Mongo’ is not recognized as an internal or external command, operable program or batch file”. How can I troubleshoot this particular issue so that I can enjoy a seamless workflow? 

Answered by Daniel BAKER

In the context of web technology the error message mongo’ is not recognized as an internal or external command, operable program or batch file is usually raised because of MongoDB executable might not be included in the PATH variable of the system.

Here are the steps given to troubleshoot this particular error:-

Check MongoDB installation

First, check whether the MongoDB is installed properly or not if not try to install it properly. Also, ensure that the MongoDB executable files should be presented in the installation directory.

Update System PATH

After checking the installation, add the MongoDB bin directory path in your system’s PATH variable.

Restart the terminal or command prompt

After completing the process of updating the PATH variable, it is time to restart your terminal or command prompt to ensure the changes are working or not.

Verify MongoDB command

Type “mongo” again in the terminal or command prompt to ensure it's properly configured or not.



Your Answer

Interviews

Parent Categories