Unable to import the dataset on mongos

For the Lab sharding a collection. I am not able to import the dataset on mongos.
I am connecting to mongos by the following command and it is getting connected to mongos as well.
mongo --host “localhost:26000” -u “m103-admin” -p “m103-pass” --authenticationDatabase “admin”
image
But the problem arises when I try to import the dataset as instructed in the lab. It simply not getting imported whereas if I import them without using mongos then the dataset is getting imported succesfully.
Where am I doing the mistake? Please suggest, I’m clueless.
image

Well I did it! I simply import the dataset first then connected to the mongos and it worked! :smiley:

Good you were able to fix it yourselves

mongo & mongod commands should be run at OS prompt
If you run them when already connected to mongod you will get syntax errors

1 Like

Hi @Jayashree_Dhar,

I’m glad you were able to resolve it. Let us know if you have any other doubts.