Lab - Shard a Collection

when i tried to import products.json asked me for pdw. somebody know it?

Are you talking about pwd? I’am using “m103-pass” since the begining of this course on the param -p of the mongoimport comand.

no, it was a system psw as when you make sudo su. But i´ve already solved it. i change to /dataset directory and ran this commads (just the mongoimport).

https://university.mongodb.com/mercury/M103/2018_November/chapter/Chapter_1_The_Mongod/lesson/5a974352c9d4ec11e704edd6/tab/5a974352c9d4ec11e704edd7

1 Like

Hey Alex, how did you fix this?? I managed to find older posts, even made sure that I had an admin user, but still, when using the import it asks for a pw…

Thnx!


in fact not more than this. plus the mongoimport we use at the video I specified (in the same mongoimport)

–db “m103” --collection products

and thats all.

If anyone else has the same issue I had with the import + password combo, this is what I did:

  1. make sure you have set the local user from previous courses, I was working on a new machine
  2. use the following command: vagrant@m103:~$ mongoimport --host localhost:27000 --authenticationDatabase=admin -u m103-application-user -p m103-application-pass -d applicationData -c products /dataset/products.json

…you should see something like this after: 2018-12-18T00:51:34.221+0000 imported 516784 documents

Hope this helped!

1 Like