I installed mongodb in Ubuntu14.04 server
I was not able to connect to mongodb via \"mongoimport\", \"mongodump\", \"mongostat\", etc. It always show \"no reachable
Adding another answer for those who are struggling with the same issue while using MongoDB Atlas.
I tried to follow the offical guides like Seed with mongorestore and Load File with mongoimport but received the same no reachable servers error.
I tried to change the command arguments over and over - nothing changed.
But then I navigated inside my cluster to the "Command Line Tools" tab and saw the exact command I should run for mongorestore, mongodump, mongoimport,mongoexport etc':
Adding as inline the full command:
mongorestore --host
-shard-0/
-shard-00-00-obe3i.mongodb.net:27017,
-shard-00-01-obe3i.mongodb.net:27017,
-shard-00-02-obe3i.mongodb.net:27017
--ssl
--username
--password
--authenticationDatabase admin
The mongorestore comand can be replaced with mongodump,mongoimport,mongoexport etc'.
(*) Prefer copying the command directly from dashboard because the DNS of the replica-sets might change.
(**) MongoDB shell version v4.2.5.