我尝试连接到我的mongo实例,我在配置<{p>}后运行mongod --auth
use admin
db.createUser(
{
user: "myUserAdmin",
pwd: "abc123",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
}
)
结果是连接被拒绝。
以下是(某些) mongod 的输出:
2016-10-26T08:40:09.218+0300 I NETWORK [conn45] end connection 127.0.0.1:59014 (0 connections now open)
2016-10-26T08:40:09.718+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:59015 #46 (1 connection now open)
2016-10-26T08:40:09.721+0300 I NETWORK [conn46] end connection 127.0.0.1:59015 (0 connections now open)
2016-10-26T08:40:10.221+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:59016 #47 (1 connection now open)
2016-10-26T08:40:10.224+0300 I NETWORK [conn47] end connection 127.0.0.1:59016 (0 connections now open)
2016-10-26T08:40:10.725+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:59017 #48 (1 connection now open)
2016-10-26T08:40:10.728+0300 I NETWORK [conn48] end connection 127.0.0.1:59017 (0 connections now open)
我尝试了使用auth机制的各种组合,但结果相同。
我的配置或插件中有什么问题吗?