-1

How i resolved Error: MongoTimeoutError: Server selection timed out after 30000 ms ,couldn't connect to server 127.0.0.1:27017

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
  • Does this answer your question? [MongoDB connection error: MongoTimeoutError: Server selection timed out after 30000 ms](https://stackoverflow.com/questions/59162342/mongodb-connection-error-mongotimeouterror-server-selection-timed-out-after-30) – M_S_N Jan 12 '20 at 05:23
  • 1
    yes, It is the answer of my question, which i found during troubleshooting. – Rabia Yousuf Ansari Feb 03 '20 at 16:22

1 Answers1

1

To resolve this error while connection MondoDB locally. enter image description here enter image description here enter image description here

Using these following Steps Reconnect or again connect MongoDB locally. 1. Open Two cmds in bin folder, where MongoDB is installed. like: (C:\Windows\System32\cmd.exe)

  1. In first cmd run: mongod, afterward command is run as per below picture. enter image description here

  2. In second cmd run: mongo enter image description here

After doing all above steps reconnect the MongoDB locally