Reputation: 11
mongo is not recognized as an internal or external commandmongodb is not recognized as an internal or external commandI'm encountering these errors after having installed mongodb using a tutorial and after having tried the edit environment variables fix.I've edited the environment variables The mongosh keyword is recognized when I type it in in the command line but mongo and mongodb aren't. Mongod results in something I'm not certain it should be resulting in.is this expected? I noticed that the number of files available in my bin folder which is where mongodb is installed is less than that of others that I've seen.this is my bin folder with less files I also noticed that after installing mongodb, the mongo compass didn't auto install. I did that manually. How can I overcome these errors and start using mongodb?
Upvotes: 1
Views: 1317
Reputation: 2146
mongod
is the binary that runs the database. It has many flags, documented here. The output you see is expected. You will often run this in the background via --fork
and send the output to a logfile.
mongo
is the legacy shell that is deprecated as of 6.0 and no longer ships.
mongosh
is the new shell that should provide all the same functionality as the legacy shell.
mongodb
there is no binary with this name.
If you are trying to connect to MongoDB Atlas or an existing database, you should not need to run mongod
yourself.
Upvotes: 1