I’m having an issue with following the steps in Shard Keys lecture - my m103 db is seen by mongos but I can’t access it. When I run db.show collections, nothing comes up, and when I try to findOne() document, it returns null.
I must have something to do with the fact that I have struggled before with adding a shard replica set to the cluster in the previous lectures but finally sorted my issue by rebuilding:
csrs replica set,
replica set, which now is sharded - m103-repl.
After successfully adding m103-repl to my sharded cluster, during the next lecture (the one I’m going through now) i realised that this replica set had a database m103 with a collection products imported from json in earlier stage of the course.
To fix this, I have imported it again to newly rebuild part of my new m103-repl, to my node1 : 27001, which has been completed scusscessfully and I can log on to this node directly and review the database (all documents have been imported correctly).
The problem is however, when I try to do anything using this db on my mongos:
I know this is only a lecture and I don’t HAVE TO follow it, but I’d like to and something tells me that the future lab will be connecting to creating a shared key, etc.
Should I be worried that I can’t see this db on my mongos?