MongoDB on a Windows 7 machine: No connection could be made

前端 未结 14 1692
渐次进展
渐次进展 2020-12-02 10:39

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

14条回答
  •  一整个雨季
    2020-12-02 11:20

    I got this problem. What fixed mine is:

    1. Suppose you have a dir: "C:\mongo_databse"
    2. 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.

    3. Now open ANOTHER command prompt then type in mongo then it works.

提交回复
热议问题