I have a MongoDB dbs named test with a collection named items. It has one item. I'm currently learning how to export a copy of the collections, but I get an error message: Failed: error connecting to db server: no reachable servers and a blank .json document. Below is my command for mongoexport in my terminal (using a Mac):
mongoexport --db test --collection items --authenticationDatabase admin --out test.json
How would I fix this so that I get the data from the collection?