3

I'm setting up my JavaScript mean stack for the first time on Linux Mint and after I enter this command: sudo mongod --dbpath, I'm getting the following error message:

Error parsing command line: required parameter is missing in dbpath

Everything I've tried doesn't help. Does anybody else face this problem? If so, how do I fix it?

Thanks!

Mike
  • 14,010
  • 29
  • 101
  • 161
Jason Thomas
  • 51
  • 1
  • 5

1 Answers1

2

The error explains what's happening, you just need to break it all down:

  • The command didn't work: Error parsing command line:
  • Because you didn't give it all the informatin it needed: required parameter is missing
  • The spot in your command that doesn't have enough information: in 'dbpath'

I'm pretty sure you just need to point it to a directory for it to use.

If you look at the documentation (or run mongod --help) you will see that you need to provide the path to your db after the --dbpath command:

--dbpath <path>

Default: /data/db on Linux and OS X, \data\db on Windows

The directory where the mongod instance stores its data.

More info here: https://docs.mongodb.org/manual/reference/program/mongod/

CenterOrbit
  • 6,446
  • 1
  • 28
  • 34
  • No need to feel stupid, we all make these mistakes, and will for the rest of our lives! If this answer fixed your problem, please mark it as "accepted". Welcome to StackOverflow! – CenterOrbit Dec 05 '15 at 21:36