how to set mongod --dbpath

前端 未结 12 1792
囚心锁ツ
囚心锁ツ 2020-12-29 19:50

very new to mongodb and databases in general. whenever i run mongo i receive this error message: ​​​

MongoDB shell version: 2.         


        
12条回答
  •  梦谈多话
    2020-12-29 20:21

    Windows environment, local machine. I had an error

    [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: 
    Error connecting to 127.0.0.1:27017 :: caused by :: 
    No connection could be made because the target machine actively refused it. :
    

    After some back and forth attempts I decided

    • to check Windows "Task Manager". I noticed that MongoDB process is stopped.
    • I made it run. Everything starts working as expected.

提交回复
热议问题