[root@VM-0-14-centos ~]# mongo MongoDB shell version v4.0.6 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("b9daecb8-ffd8-44a7-8af0-d1115057539a") } MongoDB server version: 4.0.6 > use admin switched to db admin > db.auth("yeyz_1","123456") 1 > use yeyz switched to db yeyz