0

I have a MEAN droplet on digital ocean and I've found that when I run the mongo command I connect to test successfully and have access to my other databases, but if I try to run the mongod command I get the following message:

*********************************************************************
 ERROR: dbpath (/data/db) does not exist.
 Create this directory or give existing directory in --dbpath.
 See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************

How is this possible? I thought mongo was connecting to a specific instance of mongod.

I will create the /data/db folder, but I feel like I might just be ignoring another problem with setup configuration that has allowed this to happen.

1 Answer 1

1

/data/db will be the place you store your database data. After you created that folder, you can run mongod as normal.

The mongod is a command to start mongodb server. And mongo is a command line interface to make you community with mongodb server. So you should start the server -> community with server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.