###按说明使用以下连接字符串:
####connectString:‘mongodb://admin:xxxxxxxxxxxx@oceanic.mongohq.com:10063/mysite’;
#####以下为出错误信息,高手怎么看? 难道是session-mongoose跟它不匹配
D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_modules\mongodb\lib\mongodb
\connection\base.js:242
throw message;
^
MongoError: auth fails
at Object.toError (D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_modu
les\mongodb\lib\mongodb\utils.js:110:11)
at D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_modules\mongodb\lib
mongodb\auth\mongodb_cr.js:39:33
at D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_modules\mongodb\lib
mongodb\db.js:1806:9
at Server.Base._callHandler (D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose
\node_modules\mongodb\lib\mongodb\connection\base.js:442:41)
at D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_modules\mongodb\lib
mongodb\connection\server.js:485:18
at MongoReply.parseBody (D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\nod
e_modules\mongodb\lib\mongodb\responses\mongo_reply.js:68:5)
at null.<anonymous> (D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_mo
dules\mongodb\lib\mongodb\connection\server.js:443:20)
at EventEmitter.emit (events.js:95:17)
at null.<anonymous> (D:\NodeJsProject\blogDemo\node_modules\session-mongoose\node_modules\mongoose\node_mo
dules\mongodb\lib\mongodb\connection\connection_pool.js:191:13)
at EventEmitter.emit (events.js:98:17)
上面不是提示错误的信息了吗?MongoError: auth fails
你是不是没有权限。:(
我已经申请了帐号,新建好了数据库的
你有没有新建用户并设置用户权限呢