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

前端 未结 14 1686
渐次进展
渐次进展 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 had a very similar experience to @user1501382, but tweaked everything slightly in accordance with the documentation

    1) cd c: //changes to C drive

    2) mkdir data //creates directory data

    3) cd data

    4) mkdir db //creates directory db

    5) cd db //changes directory so that you are in c:/data/db

    6) run mongod -dbpath

    7) close this terminal, open a new one and run mongod

提交回复
热议问题