[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/test
> show dbs;
Tue May 7 06:41:53 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
> exit
bye
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017 -uadmin -pxxxxx
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/test
Tue May 7 06:42:53 uncaught exception: login failed
exception: login failed
PS:要去连接admin库才行:
[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017/admin-uadmin -pxxxx
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/admin
PRIMARY> rs.status();
{
"set" : "sso-rest",
"date" : ISODate("2013-05-07T06:43:21Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "xxxxx:37017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" : {
"t" : 1367909001000,
"i" : 37
},
"optimeDate" : ISODate("2013-05-07T06:43:21Z"),
"self" : true
},
{
"_id" : 1,
"name" : "xxxxx:37018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 1113625,
"optime" : {
"t" : 1367909000000,
"i" : 10
},
"optimeDate" : ISODate("2013-05-07T06:43:20Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 2,
"name" : "xxxxx:37017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 268349,
"optime" : {
"t" : 1367908999000,
"i" : 32
},
"optimeDate" : ISODate("2013-05-07T06:43:19Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 3,
"name" : "xxxxxx:37018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 1113567,
"optime" : {
"t" : 1367908999000,
"i" : 19
},
"optimeDate" : ISODate("2013-05-07T06:43:19Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 4,
"name" : "xxxxx:37019",
"health" : 1,
"state" : 7,
"stateStr" : "ARBITER",
"uptime" : 1113627,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:21Z"),
"pingMs" : 0
}
],
"ok" : 1
}
分享到:
相关推荐
NULL 博文链接:https://lbyzx123.iteye.com/blog/2359387
无法正常调用,直接报错: 复制代码 代码如下: Fatal error: Uncaught exception ‘com_exception’ with message ‘Failed to create COM object `InternetExplorer.Application’: 拒绝访问。 原因是IE的COM组件...
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' 点开错误的文件,标注错误的地方是这样的一段代码: import {normalTime} from './timeFormat'; module....
主要介绍了JQuery报错"Uncaught TypeError: Illegal invocation"的处理方法,需要的朋友可以参考下
JavaScript 异常处理 异常处理概述 在代码的运行过程中,错误是不可避免的,总...而后一种则更 多的称之为异常(exception),顾名思义,就是超出常规,没有按程序设计的意愿来输入数据。当然,异常还会有许多种类型。