osx - Dont want to have to start mongod with `sudo mongod` -
osx - Dont want to have to start mongod with `sudo mongod` -
i downloaded mongodb onto brandy new macbookair os x 10.9.5 doing brew install mongodb.
i tried run mongod terminal , said "no /data/db" created sudo mkdir /data , sudo mkdir /data/db.
running mongod "unable create/open lock file: /data/db/mongod.lock errno:13 permission denied" can run fine sudo mongod.
how can create don't have run mongod sudo, instead mongod?
(i had on lastly computer not remember did @ all, , computer messed anyway.)
simple start with
mongod --dbpath ~/.mongodb/data --logpath ~/.mongodb/mongod.log --fork after did an
mkdir ~/.mongodb the problem default dbpath /data/mongodb created root.
another alternative
chown <your username here> -r /data/mongodb and run mongod default paths.
as alternative running mongodb straight under osx, might want have atm202docker, allows run mongodb in (thin) virtualized environment. there other docker images mongodb well.
disclaimer: created m202docker image, propably biased
osx mongodb
Comments
Post a Comment