osx - Dont want to have to start mongod with `sudo mongod` -


I just got brew install mongodb with OS X 10.9.5 on Brandi's new MacBook Air.

I tried to run mongod from the terminal and he said "no / data / db" so I used to call it sudo mkdir / data and Sudo MkDir / Data / DB .

is now running "Unable to create / open lock file: /data/db/mongod.lock error: 13 permission is denied" but I can call it sudo mongod .

How can I make it so that I do not have to run Mongoode with pseudo, but instead just mongod

(I was like this That's on my last computer, but I do not remember what I did, and that computer had messed up everything.)

This worked for me:

  sudo chmod-r 777 / data / db   

then

  makes Sudoku chown-r_ id -u` / data / db   

-R command recursive; I tried to direct the other stack overflow answers as both sudo chmod 777 / data / db and sudo chown `id -u` / data / db but They failed.

(PS I'm sorry, I know this is a very old question, but I found myself trying to see the answer to my problem, and since I got it successful, I thought That I will keep it here in the future. Anyway, I am not sure which one of these two commands, but it worked.)

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -