Start MongoDB Service

  1. Press Windows+R, type services.msc and press Enter.
    Figure 1. MongoDB Installation – Start MongoDB Service (non-HA)
    A screenshot of a computer error message Description automatically generated
  2. Search for MongoDB service.
  3. Click MongoDB service and click Start the service on the Left pane.
    Figure 2. MongoDB Installation – Start MongoDB Service (non-HA) (Cont.)
    A screenshot of a computer Description automatically generated
  4. Go to the server that has MongoDB service installed.
  5. 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
  6. If the service is running successfully, then the connection will be established. If not, then follow the above steps again.