Hi all,
i dont know why i cannot export the file.
-
i opened the first terminal and type
mongod --dbpath /var/mongodb/db --port 27000 --auth --logpath /var/mongodb/logs/mongod.log -
opened the second terminal and type
mongo --port 27000
and it connected to mongod -
i opened a new terminal andtype
mongoexport --port 27000 -u “m103-application-user” -p “m103-application-pass” --authenticationDatabase “admin” --db dataset --collection products -o products.json
it says “2022-05-09T17:31:08.306+0000 Failed: (Unauthorized) not authorized on dataset to execute command { listCollections: 1, filter: { name: “products” }, lsid: { id: UUID(“57a4afd1-bb3c-4aff-83a0-08ec4d036450”) }, $db: “dataset” }”
Any step did i do it wrong?
I expected it will output a json file for me.
Thank you!