Error while Creating First Application User

I was creating a new user as per the question

image

I was running the below query

mongo admin --host localhost:27000 --eval 'db.createUser({user:“m103-admin-user”,pwd:“m103-application-pass”,roles:[{role:“readWrite”,db:“admin”}]})'

Than it gave the error as below

image

I tried to run one additional quey to authenticate my user as my previous query was throwing authentication error

image

I thought it might be because of the mongod running on the localhost port 27017,so I tried to restart the mongod with new configuration.

image

But it was also throwing the error.

Please let me know if I’m doing anything wrong here.

Please reread the lab description. You missed some important information. The lab starts with:

Step 1: Connect to a mongod instance that has already been started in the background on port 27000 . The options used to launch mongod are in the configuration file in the IDE.

Parts of the important information you missed are:

  1. You try to connect to standard port but the lab says mongod listens to port 27000.
  2. You try to start mongod but the lab says mongod instance has already been started.