Could not connect to MongoDB on the provided host and port
I just want to try MongoDB Compass GUI for MongoDB, but when I try to connect using local host port: 27017 I get this error:
Could not connect to MongoDB on the provided host and port
I followed these instructions on YouTube.
To solve mongodb not running on the provided host and port issue you should just follow the following steps while connecting MongoDB tool(MongoDB Compass)to MongoDB:
Go to C drive and create a folder db in the path C:datadb, if you don't see the data folder in C drive, please create it first and then db folder
Go the folder, where you had installed MongoDB, in my case, it was C:Program FilesMongoDBServer.2in
Type the command C:Program FilesMongoDBServer4.2bin>mongod
This will set up MongoDB on your system and now if you try connecting, you may not be getting the issue.