Start MongoDB Service
- Press Windows+R, type services.msc and press Enter.
Figure 1. MongoDB Installation – Start MongoDB Service (non-HA)
- Search for MongoDB service.
- Click MongoDB service and click Start the service on the Left pane.
Figure 2. MongoDB Installation – Start MongoDB Service (non-HA) (Cont.)
- Go to the server that has MongoDB service installed.
- Open the Command Prompt as Administrator and execute the command below by
changing 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, then the connection will be established. If not, then follow the above steps again.