Create a MongoDB user from commandline

后端 未结 3 851
悲哀的现实
悲哀的现实 2021-02-19 04:23

I have set up a MongoDB database with an admin user that has only administrative rights, not read or write access to databases.

What I now would want to do

3条回答
  •  北海茫月
    2021-02-19 05:27

    Above in my case didn't worked

    use dummyDb
    
    db.createUser({user: "admin",pwd: "secrectP@wd",roles: [ { role: "readWrite", db: "reporting" } ],mechanisms: [ "SCRAM-SHA-256" ]   }
    

提交回复
热议问题