Start MongoDB Service

  1. Press Windows+R, and type services.msc and press Enter
    Figure 1. Start MongoDB Service
    A screenshot of a computer error message Description automatically generated
  2. Search for MongoDB service, then click on MongoDB service and click Start the service on the Left pane.
    Figure 2. Start MongoDB Service (Cont.)
    A screenshot of a computer Description automatically generated
  3. 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
  4. If the service is running successfully, the connection will be established without any error message.