I just downloaded mongodb onto my brandy new MacBookAir with OS X 10.9.5 by doing brew install mongodb
.
I tried to run mongod
from Terminal and it said "no /data/db" so I created it with sudo mkdir /data
and sudo mkdir /data/db
.
Running mongod now I get "Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied" but I can run it perfectly fine with sudo mongod
.
How can I make it so that I don't have to run mongod with sudo, but instead just as simply mongod
?
(I had it like that on my last computer but do not remember what I did at all, and that computer was all messed up anyway.)