InterviewSolution
| 1. |
Based on the below workload for a production system which of the shard key option is best suited? |
|
Answer» If we start Mongo server using mongod with the --auth option it will enable authorization but we will not be able to do anything, even listing databases using SHOW DBS will fail with an error "not authorized on admin to execute the command". This is because we have not authenticated yet to the database. But this is a NEW database with no users in this database, so how can we create new users with no authorization. MongoDB provides localhost exception for creating the first user on the database without any authorization. With this first user, we can create other users with relevant access. But there are a few considerations to it: |
|