mongo.exe not installed in Version 6.0.0
Asked Answered
G

14

41

I installed MongoDB community Server from this link. But when I look into C:\Program Files\MongoDB\Server\6.0\bin , I am not able to locate mongo.exe file. I am able to see mongod.exe and mongos.exe. Can someone help. Thank you.

Gleanings answered 22/7, 2022 at 14:9 Comment(0)
I
50

legacy mongo shell (mongo) no longer ships with server binaries (for servers >= 6.0). You can download a new shell version (mongosh) from here

Indemnify answered 22/7, 2022 at 18:2 Comment(3)
that ridiculous that they don't include this in the release noteIsa
@transang it is documented in Compatibility Changes in MongoDB 6.0: "Legacy mongo Shell Removed"Domingadomingo
Latterly, I know that website. But this is absolutely fragmented. All breaking changes should be unified in the relaes notes, at least, they should drop a reference to that link.Isa
A
31

Answer from dododo worked for me.

  1. Download Mongo Shell - mongosh from MongoDB Download Center
  2. Extract the contents of the bin from the downloaded zip file to the bin file of your MongoDB folder and run mongosh instead of mongo.
Antitoxin answered 2/8, 2022 at 13:27 Comment(0)
A
5

After version 6.0.0 mongo.exe does not get installed to your bin folder so you have to manually install the new MongoDB shell which is called mongosh then you have to add its path to your system variables and then run mongosh --version to see if it got installed. Afterwards if you want to create your own databases and preform operations run "mongosh" in your terminal to connect to a MongoDB instance running on your localhost with default port 27017.

Read the mongoDB documentation for more information:

Antarctic answered 31/8, 2022 at 6:34 Comment(0)
U
3

To run the Mongo Shell , Download msi package from the MongoDB Community Download - https://www.mongodb.com/try/download/community The version 6.0 do not ships with server binaries so mongo.exe file wouldn't be shown. So instead download mongo shell - https://www.mongodb.com/try/download/shell After downloading unzip the bin directory in your Original bin directory (You would also need to create a new directory in C: drive named data/db) Now open the bin directory from Mongodb folder, and run mongod.exe After that keeping Mongod.exe running in background open mongosh.exe , Your mongo Shell will be started.

Ulises answered 16/8, 2022 at 7:2 Comment(0)
D
2

It should be noted, that in MongoDB version 6.0 there are two items:

  • The legacy mongo shell is removed from MongoDB 6.0
  • The MongoDB Shell (mongosh) is not installed with MongoDB Server. You need to follow the mongosh installation instructions to download and install mongosh separately. This was already announced in MongoDB version 5.0

The legacy mongo shell does not exist anymore on MongoDB version 6.0. If you desire the old mongo.exe, then you can install if from an earlier MongoDB version.

Domingadomingo answered 2/10, 2022 at 7:16 Comment(0)
B
2

mongo.exe doesn't come in version 6.0+ with a community package. However, you can follow through to use Mongo with Mongosh (Mongo Shell) + you can also use mongosh with Hyper

  • First, download and install Mongo shell from this link.

  • Then extract the file and place them in program files. (Note the path)

  • Now you have to create an environment variable. open the "Edit the system environment variable" window. Here is the screenshot

  • Now click on environment variables. Screenshot

  • Now click on edit under System variablesScreenshot

  • Paste the path of the Mongo shell to set up the environment.

Now Set up Using Hyper

  • Run cd ~ to go to the root directory in Hyper.

  • Then run touch .bash_profile. to create the file.

  • After that Run " vim .bash_profile" to open the file and press "i" to insert path.

  • Now enter the following path "alias mongsh="/c/Program\ Files/MongoDB/mongosh/bin/mongosh.exe" (Make sure to replace the path with the installation path for mongosh.exe in your computer)

  • Now run the command mongosh in Hyper to check the installation. Installation Successful

Broadbrim answered 13/4, 2023 at 18:18 Comment(0)
A
1

You can open the InstallCompass.ps1 PowerShell script to install MongoDB Compass (which includes an embedded version of mongosh, the new MongoDB Shell) or download the MongoDB Shell from the the MongoDB Download Center

Andalusia answered 22/2, 2023 at 13:2 Comment(0)
I
0

You also need to add a path variable of the bin folder where mongosh application is present (after downloading from the below link:
https://www.mongodb.com/try/download/shell ).

Then you can use mongosh command from anywhere using CMD:

screenshot where mongosh is present

Insuppressible answered 8/1, 2023 at 10:43 Comment(1)
Please don't paste screenshots, use formatted text. See meta.https://mcmap.net/q/19778/-how-to-add-a-simple-api-to-my-c-application-for-access-by-labviewDomingadomingo
K
0

Just install mongosh (mongo shell) from MongoDB site mongoDB site , after installing unzip the file and go to bin folder and copy the mogosh file and paste in the directory where your all mongo file is stored( MongoDB -> server -> 6.0 -> bin ). after this open cmd and rum mongosh command. it will successfully run.

Kirkwood answered 7/4, 2023 at 14:7 Comment(0)
B
-1

download mongo shell from https://www.mongodb.com/try/download/shell downloading and unzip the bin directory copy the files in the original bin directory from Mongodb folder, and run mongod.exe open a new tab and run mongosh.exe which worked for me.

Barrett answered 18/3, 2023 at 6:14 Comment(0)
C
-1
if you download mongoDB version<6.0 then  command for mongo shell is (mongo)
if you use mongoDB version>6.0 then command for mongo shell is (mogosh)
but you must be place inside mongoDB  download folder (mongosh.exe) file
https://downloads.mongodb.com/compass/mongosh-1.8.0-win32-x64.zip
and after download you  must be keep extract the zip file and keep 
mongosh.exe file inside mongoDB folder bin file.
Cryometer answered 7/4, 2023 at 9:27 Comment(0)
H
-1

You are saving below something like:
alias mongod="/c/Program\ files/MongoDB/Server/4.0/bin/mongod.exe"
alias mongo="/c/Program\ Files/MongoDB/Server/4.0/bin/mongo.exe"

But since in updated version some changes are made so you need to do some changes as well like this:
alias mongod="/c/Program\ files/MongoDB/Server/your current version(example: 5.0 or 6.0 or 6.1 etc)/bin/mongod.exe"
alias mongo="/c/Program\ Files/MongoDB/Server/your current version(example: 5.0 or 6.0 or 6.1 etc)/bin/mongos.exe"
=====> just change bold text with your old one(that is in mongo.exe's s like mongos.exe and your version only means mongo.exe to mongos.exe and your latest version what you've downloaded)

Hartill answered 15/4, 2023 at 13:59 Comment(2)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Nicko
mongos and mongosh are completely diff toolsIndemnify
P
-1

After spending an hour, I came to know that mongodb version 6+ doesn't have mongosh and you have to install it manually.

  1. Go to here and download the zip file.
  2. Extract the zip file and then copy the folder to MongoDB server folder or somewhere else
  3. Copy the path and add to environment variable
  4. Run mongosh from command prompt.
Pentstemon answered 9/7, 2023 at 21:41 Comment(0)
C
-2

STEPS TO FOLLOW AFTER DOWNLOADING SHELL FROM https://www.mongodb.com/try/download/shell

Include both your mongosh shell and mongod in environment variables.

  1. go to your c drive and create db folder inside data folder

  2. then run your mongosh and mongod in two different cmd windows separately

    ..first run mongod ..then run mongosh

  3. if you have check-marked run as a service at the time of download then next time you are not required to start mongosh , it will automatically get started.

Carabineer answered 4/11, 2022 at 5:8 Comment(1)
How does it answer the question? mongosh (which is a client) does not start automatically when mongod runs as service.Domingadomingo

© 2022 - 2024 — McMap. All rights reserved.