mongodb-win32-i386-3.0.6 使用常见错误

1.Error parsing YAML config file: yaml-cpp: error at line 3, column 28: unknown escape character: m

指定日志文件路径时不要用 \  ,使用/ 

 

2.

2015-09-11T15:18:57.982+0800 F CONTROL Failed global initialization: FileNotOpen logpath "D:/applications/mongodb/logs"
should name a file, not a directory.

日志文件必须存在,只有文件夹不可以,不会自动创建文件。

 

3.

2015-09-11T18:49:32.032+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:2621 #3 (1 connection now open)
2015-09-11T18:49:32.048+0800 I ACCESS [conn3] authenticate db: admin { authenticate: 1, nonce: "xxx", user: "admin", key: "xxx" }
2015-09-11T18:49:32.048+0800 I ACCESS [conn3] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed key mismatch
2015-09-11T18:49:32.048+0800 I NETWORK [conn3] end connection 127.0.0.1:2621 (0 connections now open)

检查密码是否正确,不要包含单引号。假如密码是 !QAZ2wsx  不要-p '!QAZ2wsx'

 

4. 获取帮助信息

D:\applications\mongodb-win32-i386-3.0.6\bin>mongo --help
MongoDB shell version: 3.0.6
usage: mongo [options] [db address] [file names (ending in .js)]
db address can be:
  foo                   foo database on local machine
  192.169.0.5/foo       foo database on 192.168.0.5 machine
  192.169.0.5:9999/foo  foo database on 192.168.0.5 machine on port 9999
Options:
  --shell                            run the shell after executing files
  --nodb                             don't connect to mongod on startup - no
                                     'db address' arg expected
  --norc                             will not run the ".mongorc.js" file on
                                     start up
  --quiet                            be less chatty
  --port arg                         port to connect to
  --host arg                         server to connect to
  --eval arg                         evaluate javascript
  -h [ --help ]                      show this usage information
  --version                          show version information
  --verbose                          increase verbosity
  --ipv6                             enable IPv6 support (disabled by default)

Authentication Options:
  -u [ --username ] arg              username for authentication
  -p [ --password ] arg              password for authentication
  --authenticationDatabase arg       user source (defaults to dbname)
  --authenticationMechanism arg      authentication mechanism
  --gssapiServiceName arg (=mongodb) Service name to use when authenticating
                                     using GSSAPI/Kerberos
  --gssapiHostName arg               Remote host name to use for purpose of
                                     GSSAPI/Kerberos authentication

file names: a list of files to run. files have to end in .js and will exit after unless --shell is specified

 

转载于:https://www.cnblogs.com/zno2/p/4801897.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值