init-mongo.js 243 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
db = db.getSiblingDB('icarus') //create and set db
db.createUser(
    {
        user: "icarus",
        pwd: "icarus",
        roles: [
            {
                role: "dbAdmin",
                db: "icarus"
            }
        ]
    }
)