- 精华
- 阅读权限
- 90
- 好友
- 相册
- 分享
- 听众
- 收听
- 注册时间
- 2010-4-17
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
我在虚拟机里执行
提示:
- DB:Error auth failed
- DB:Error auth failed
复制代码
而在第一条命令的终端里就会显示
- [root[url=home.php?mod=space&uid=2338039]@localhost[/url] mongodb]# ./mongod -port 2007 --dbpath ./data --auth
- 2017-10-26T08:24:08.210+0800 [initandlisten] MongoDB starting : pid=2731 port=2007 dbpath=./data 64-bit host=localhost.localdomain
- 2017-10-26T08:24:08.210+0800 [initandlisten] db version v2.6.12
- 2017-10-26T08:24:08.210+0800 [initandlisten] git version: d73c92b1c85703828b55c2916a5dd4ad46535f6a
- 2017-10-26T08:24:08.210+0800 [initandlisten] build info: Linux build5.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
- 2017-10-26T08:24:08.210+0800 [initandlisten] allocator: tcmalloc
- 2017-10-26T08:24:08.210+0800 [initandlisten] options: { net: { port: 2007 }, security: { authorization: "enabled" }, storage: { dbPath: "./data" } }
- 2017-10-26T08:24:08.228+0800 [initandlisten] journal dir=./data/journal
- 2017-10-26T08:24:08.228+0800 [initandlisten] recover : no journal files present, no recovery needed
- 2017-10-26T08:24:08.368+0800 [initandlisten] waiting for connections on port 2007
- 2017-10-26T08:24:21.677+0800 [initandlisten] connection accepted from 127.0.0.1:45132 #1 (1 connection now open)
- 2017-10-26T08:24:21.683+0800 [conn1] authenticate db: admin { authenticate: 1, nonce: "xxx", user: "root", key: "xxx" }
- 2017-10-26T08:24:21.684+0800 [conn1] Failed to authenticate root[url=home.php?mod=space&uid=1]@admin[/url] with mechanism MONGODB-CR: AuthenticationFailed key mismatch
- 2017-10-26T08:24:21.686+0800 [initandlisten] connection accepted from 127.0.0.1:45133 #2 (2 connections now open)
- 2017-10-26T08:24:21.692+0800 [conn2] authenticate db: admin { authenticate: 1, nonce: "xxx", user: "root", key: "xxx" }
- 2017-10-26T08:24:21.693+0800 [conn2] Failed to authenticate root@admin with mechanism MONGODB-CR: AuthenticationFailed key mismatch
- 2017-10-26T08:24:21.695+0800 [conn1] end connection 127.0.0.1:45132 (1 connection now open)
- 2017-10-26T08:24:21.696+0800 [conn2] end connection 127.0.0.1:45133 (0 connections now open)
复制代码
在此之前,我已经百度IP并把当前IP加数据库密码放进授权程序里进行生成key.ini并替换到了/home/game根目录下,而且我虚拟机和我电脑都能PING通,虚拟机里ping也是能通的。
请问该如何解决,求解,非常感谢!~ |
|