>
> db.system.users.find().pretty()
{
"_id" : "admin.useradmin",
"user" : "useradmin",
"db" : "admin",
"credentials" : {
"SCRAM-SHA-1" : {
"iterationCount" : 10000,
"salt" : "6hLx/d97hS+yfoN47QTmXQ==",
"storedKey" : "B0PqwVs3GFKIHQyyQ6mBp1MA370=",
"serverKey" : "xK53AKKAvFCdn5rsEtij5QB9RtU="
}
},
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "dbAdminAnyDatabase",
"db" : "admin"
}
]
}
{
"_id" : "admin.admin",
"user" : "admin",
"db" : "admin",
"credentials" : {
"SCRAM-SHA-1" : {
"iterationCount" : 10000,
"salt" : "snlJe16a2PX3dSwxnOsfAw==",
"storedKey" : "VOoX1e7F0tOme6YuR+iyMLuEWK8=",
"serverKey" : "aSlpI7TzlyJ5Ccbd8GoptNB8khk="
}
},
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "dbAdminAnyDatabase",
"db" : "admin"
}
]
}
>
> ^C
bye
[root@linuxidc local]#
[root@linuxidc local]#
[root@linuxidc local]#
[root@linuxidc local]# /usr/local/mongodb/bin/mongo --port=27117 -u admin -p admin --authenticationDatabase admin
MongoDB shell version: 3.2.5-20-g07e21d8
connecting to: 127.0.0.1:27117/test
>
> show dbs
admin 0.000GB
local 0.000GB
>
>
7. 启动时的报警处理
在mongodb启动过程中,有时会提示一些警告,其中常见的两类警告处理过程如下:
警告1:
提示: