osx - MongoDB: mongoexport produces blank json and error message -


i have mongodb dbs named test collection named items. has 1 item. i'm learning how export copy of collections, error message: failed: error connecting db server: no reachable servers , blank .json document. below command mongoexport in terminal (using mac):

mongoexport --db test --collection items --authenticationdatabase admin --out test.json 

how fix data collection?

try adding host parameter:

mongoexport --host=127.0.0.1 --db test --collection items --authenticationdatabase admin --out test.json 

Comments