I have a doubt. I’m at the third lecture “Setting Up a Replica Set” of Chapter 2: Replication of M103.
At 3:27 Matt executes the
rs.initiate() command. The shell shows some data that didn’t show to me (from $operationTime line to bottom) and the shell stays in MongoDB Enterprise > whereas my command line went from MongoDB Enterprise m103-example:SECONDARY> to MongoDB Enterprise m103-example:PRIMARY:
After I pressed ENTER it went from SECONDARY to PRIMARY.
What’s up with these differences? I know I can keep up with the practice but I get bothered with this SECONDARY/PRIMARY because I feel I’m in a different place and feel that whatever command I execute will take a different effect if I’m in PRIMARY, SECONDARY or just MongoDB Enterprise
What would have happened if I executed the
db.createUser()command when it showed up SECONDARY?
MongoDB shell version: 3.6.16
I’m sorry if I ask unnecessary stuff or out of the scope of the course.