0

I'm trying to run mongodin my terminal, but I'm getting a command not found. I've consulted other questions on this issue, including this these: mac: command not found: mongod Mongod: Command Not Found (OS X)

But the solutions have not worked for me.

Here is the full path of mongod:

/Users/danno/mongodb/bin/mongod

In .zshrc, I've tried two scripts, but neither one works:

Attempt 1 (from other Stack Overflow questions):

export PATH="$PATH:/usr/local/mongodb/bin"

Attempt 1 (My own guess):

export PATH="$PATH:/Users/danno/mongodb/bin/mongod"

I've restarted the terminal multiple times to no avail.

From the terminal, I'm trying to run:

mongod --dbpath=/Users/danno/mongodb-data

Getting a command not found while running that and also just with mongod alone.

Is something wrong with my pathing?

InspectorDanno
  • 935
  • 2
  • 12
  • 23

1 Answers1

0

Maybe you forgot to do this step:

$ source ~/.bash_profile

It is better to put $PATH at the end.

I hope this will help. Additional options can be found in the post and the video.

Midriaz
  • 180
  • 1
  • 8