DEV Community

loading...

MongoDB - command not found: mongo

catur_hida_yat profile image Catur Meong ・1 min read

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

Discussion (4)

pic
Editor guide
Collapse
andy profile image
Andy Zhao (he/him)

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
catur_hida_yat profile image
Catur Meong Author

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
catur_hida_yat profile image
Catur Meong Author

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