diwao11
diwao11

Reputation: 151

Mongodb Error on start

I just downloaded mongodb via homebrew. When I tried starting it by mongod it said that I didn't have the data/db folder for it. I made the folder via sudo command from another stackoverflow page. Now the error that I'm getting is:

exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating

I'm not sure why it's asking me if another instance of mongod is running because I only have one bash shell open.

Any tips would be awesome. Thank you!

Upvotes: 0

Views: 117

Answers (1)

diwao11
diwao11

Reputation: 151

Okay, I figured it out. The command after sudo mkdir -p /data/db is

sudo chown $USER /data/db

Upvotes: 0

Related Questions