skip to Main Content

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

13

Answers


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

    Login or Signup to reply.
  2. 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.
    Login or Signup to reply.
  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.

    Login or Signup to reply.
  4. 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:

    Login or Signup to reply.
  5. 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.

    Login or Signup to reply.
  6. 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.

    Login or Signup to reply.
  7. 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

    Login or Signup to reply.
  8. 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

    Login or Signup to reply.
  9. 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.

    Login or Signup to reply.
  10. 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.
    
    Login or Signup to reply.
  11. 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.

    Login or Signup to reply.
  12. 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

    Login or Signup to reply.
  13. 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)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search