Creating a database in Mongo: can't connect, get “connect failed”

后端 未结 5 844
刺人心
刺人心 2020-12-13 19:02

I want to create a new database in Mongo. However, I\'m having trouble connecting:

:~$ mongo
MongoDB shell version: 1.6.5
connecting to: test
Tue Dec 21 18:         


        
5条回答
  •  心在旅途
    2020-12-13 19:37

    You'll need to run mongod (the daemon) before you can use mongo (the client), it's easiest to just run it in another shell; These should be in your path if mongo is installed correctly. After that the docs should get you through creating and editing dbs and collections.

提交回复
热议问题