-1

i was having problem in starting up my mogodb server..(in ubuntu 16.04 LTS) i type in the command "monogod" in the terminal and this is what i get..... ERROR: dbpath (/data/db) does not exist. Create this directory or give existing directory in --dbpath.

i understand that this means that the directory /data/db/ does not exist so to resolve it i type in .... mongod --dbpath /data/db/ but once again i get the same error. i've googled the error many times but to no avail can someone please help.. i am entirely new to this whole thing...

Thank You

Rohit
  • 13
  • 1
  • 5

1 Answers1

1

"ERROR: dbpath (/data/db) does not exist" means that the directory does not exist.

You need to make the directory.

Try:

mkdir -p /data/db

If you get a "permission denied" error, run:

sudo mkdir -p /data/db

and then type in your administrator/root password.

Read more about creating directories.

Community
  • 1
  • 1
Josh Beam
  • 19,292
  • 3
  • 45
  • 68