Lab1 launching Mongod

used the below command for start mongod instance
mongod --port 27000 --dbpath /data/db --bind_ip 127.0.0.1,192.168.103.100

mongo --port 27000

connection is successfull
after that i created user with the given command
mongo admin --host localhost:27000 --eval ‘db.createUser({user: “m103-admin”,pwd: “m103-pass”,roles: [{role: “root”, db: “admin”}]})’

but it shows the db as test
So i tried to dropuser but it is not deleted

Please help me in this

Hey @baishakhi_81883

Did you run this exact command inside the mongo shell?

Or just

Some step could be.

  1. Connect the the mongo shell
  2. type use admin to switch to admin db
  3. run
db.createUser({
  user: "m103-admin" ,
  pwd: "m103-pass",
  roles: [{ role: "root", db: "admin" }]
})
1 Like