Percona Server for MongoDB shell version v4.0.12-6 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("1beaa175-c573-4181-80da-d91c241e05f1") } Percona Server for MongoDB server version: v4.0.12-6
switched to db admin
db.createUser({ user: "root", pwd: "12345687", roles: [ "root" ] })
Successfully added user: { "user" : "root", "roles" : [ "root" ] }
bye
switched to db myMongodbDb
db.createUser({ user: "bob", pwd: "password", roles: [{ role: "readWrite", db: "myMongodbDb" }] })
Successfully added user: { "user" : "bob", "roles" : [ { "role" : "readWrite", "db" : "myMongodbDb" } ] }
bye
find /lib/systemd/ -name "*mongo*" /lib/systemd/system/mongod.service systemctl show mongod.service