Start MongoDB Service
- Press Windows+R, and type services.msc and press Enter
Figure 1. Start MongoDB Service
- Search for MongoDB service, then click on MongoDB service and click
Start
the service on the Left pane.
Figure 2. Start MongoDB Service (Cont.)
- Go to the server that has MongoDB service installed. Open the Command Prompt as
Administrator and execute the below commands by changing the respective IP and port
of
server.
mongosh --host <IP> --port <port on which mongoDB service is running (mentioned in config file)> for e.g. - mongosh --host 10.1. 1xx.x1 --port 27017 - If the service is running successfully, the connection will be established without any error message.