0
votes

I am using following command to import .csv file in mongodb:

"mongoimport --type csv --file /home/priya/Downloads/data.csv --headerline". But getting error as could connect to 127.0.0.1. Any workaround as what could be done. Thanks in advance

3
Is your Mongo server running? Is it running on a standard port? - Hubert OG

3 Answers

0
votes

Your mongod is not running (on port 27017)!

0
votes

Run your mongod in a different terminal first.

To check if mongo is running, type top in your terminal and it will list out the current running processes, and you can check if there is one with the description of mongo or mongod

Try your command after that in a different terminal and it should work

0
votes

On Meteor the default MongoDB port is 3001, so run your app and in an other terminal launch your mongoimport on 3001 port.