Install mongosh
The .msi
installer does not include mongosh. Follow the mongosh installation instructions to download and install the shell separately.
If You Installed MongoDB as a Windows Service
The MongoDB service starts upon successful installation. Configure the MongoDB instance with the configuration file <install directory>\bin\mongod.cfg
.
If You Did Not Install MongoDB as a Windows Service
If you only installed the executables and did not install MongoDB as a Windows service, you must manually start the MongoDB instance.
See Run MongoDB Community Edition from the Command Interpreter for instructions to start a MongoDB instance.
Run MongoDB Community Edition as a Windows Service
Starting in version 4.0, you can install and configure MongoDB as a Windows Service during installation. The MongoDB service starts upon successful installation. Configure the MongoDB instance with the configuration file <install directory>\bin\mongod.cfg
.
If you have not already done so, follow the mongosh installation instructions to download and install the MongoDB Shell (mongosh).
Be sure to add the path to your mongosh.exe
binary to your PATH
environment variable during installation.
Open a new Command Interpreter and enter mongosh.exe
to connect to MongoDB.
For more information on connecting to a mongod
using mongosh.exe, such as connecting to a MongoDB instance running on a different host and/or port, see Connect to a Deployment.
For information on CRUD (Create, Read, Update, Delete) operations, see:
Average Rating