MongoDB notes

Executing a MongoDB query from command line

mongo -u 'MyUsername' -p 'MyPassword' --eval 'db.getCollection("fs.files").find({"_id": ObjectId("fffffffff")});' '127.0.0.1:27017/MyDBName' 

Leave a Reply

Your email address will not be published. Required fields are marked *


× 1 = five