After I have started Mongo using mongod.exe on a Windows 7 machine, I tried to start the mongo shell that failed with the error:
Failed to connect to
I got this problem. What fixed mine is:
"C:\mongo_databse"
Open Command Prompt and type (suppose you haved added the Mongo bin directory to PATH): mongod --dbpath=C:/mongo_database
.
There will be some log to the command prompt.
Now open ANOTHER command prompt then type in mongo
then it works.