DEV Community

Catur Hidayat
Catur Hidayat

Posted on • Updated on

[SOLVE] "MongoDB - command not found: mongo"

Hi Everyone

i am new in JS & mongodb.
i tried to install mongodb for global on my mac. but I have a problem.
"mongod" command is works

but when I try "mongo" command, it can not work.

Please help

mongodb #javascript #nodejs

Top comments (4)

Collapse
 
andy profile image
Andy Zhao (he/him) • Edited

Pretty hard to debug this without seeing your full history of installation, but you might need to restart your terminal.

Were you following their tutorial?
docs.mongodb.com/manual/tutorial/i...

Also maybe try a new tab instead of a new window?

Collapse
 
brokylabs profile image
Catur Hidayat

Hai @andy Zhao, I follow the instructions from the link below.
medium.com/@peaonunes/how-to-insta...

After I restart the terminal, the command "mongod" or "mongo" becomes not working at all.

Collapse
 
clemspring profile image
Clemspring

Replace :
mongod --> ./mongod
mongo -->./mongo

Please tell me if it was helpful to you.

Collapse
 
brokylabs profile image
Catur Hidayat • Edited

thanks for the advice, I've tried to re-install,
and now it's ok. .. [SOLVE]