Back
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.
You need to press windows key button and search Services and find MongoDB then start. Then try again. It will work.
You have to 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 Files\MongoDB\Server\4.2\bin
Type the command C:Program FilesMongoDBServer4.2bin>mongod
This will set up the MongoDB on your system and now if you try connecting, you may not be getting the issue.
31k questions
32.8k answers
501 comments
693 users