Mongo is unable to start

后端 未结 9 947
故里飘歌
故里飘歌 2020-12-28 08:58

I\'m trying to start mongo uin windows10 by type: mongo in cmd.

I am getting this error:

C:\\Users\\Itzik>mongo
MongoDB shell versio         


        
9条回答
  •  -上瘾入骨i
    2020-12-28 09:40

    Have you started the server? Mongodb follows a server-client architecture. mongo is the client, but before it is started you need to start mongod, which is the server.

    If you haven't, start the server in advance in a different console:

    mongod --dbpath "c:\data"
    

    replacing c:\data by any folder where you want to store your data (you need to create the folder in advance).

    If mongod is not in the path look in the installation path, it should be something like C:\mongodb\bin\mongod.exe.

    When the server says something like 'waiting for connections', then you can go to another console and type mongo to start the client.

提交回复
热议问题