Chapter 3: Lab Shard a Collection

I have an issue with this lab. I tried to find the answer in another thread.

mongoimport --port 26000 -u"m103-admin" -p"m103-pass" --authenticationDatabase “admin” --db m103 --collection products --file /dataset/products.json

I get

Then i run mongos
After sharding the collection and run the test, i get

I am confusing, one message tells me the collection is imported and other said no.

What is wrong?

Otherwise i tried to do the lab again, and when i run test, told me that the collection is properly imported but gave me a hint : there are two shard keys

What is wright?

Did your import go fine?
It shows some authentication error
Is the command you pasted is what you used?
There is no space after -u & -p.

103.products is not the same as m103.products

Hi Ramachandra_37567

Authentication looks like an error but got the space,
and i wrote the properly quotation marks, not the one that appears in the command
I tried with an space after -u & -p, but i get the same issue
and got the same answer after run the test.
Didn´t paste the command, i wrote by myself


Hi steevej-1495

You are right.
It´s important keep in mind which database one is working on :blush:

Thanks a lot for your help