Lab: Shard a Collection syntax error

with code above, I am enabling sharing on “m103”, but it kept return on error “bash: syntax error near unexpected token `“m103”’”
I tried sevral ways likes type the code on linux then copy into lab, but still says wrong.

I have no idea now.

Hi @Tianyi_Hu,

sh.enableSharding("m103")

The following command, run from a mongos , which enables sharding for the database. You are trying to run it from the IDE shell/terminal, that’s why it’s throwing an error.

First, run the mongo command then run the above-shared command.

I hope it helps!

Thanks,
Kushagra

So that means I need to mongo the port 26000 then enabling sharding right?

Yes
When you connect with port 26000 you are at mongos prompt

Got it, all set, thank you!