小编Man*_*ons的帖子

无法在启用身份验证的情况下连接到MongoDB

我正在为Ubuntu 14.04运行最新的MongoDB

  • 我创建了一个名为"admin"的用户,其中包含"userAdminAnyDatabase"角色
  • 我可以在本地和外部访问数据库
  • 我可以使用带有SHA-SCRAM-1的"admin"登录

当我编辑配置文件以限制只有身份验证的访问时出错.怎么了:

  1. 我在配置文件中取消注释"#auth = true".
  2. 我无法使用"admin"帐户的正确凭据进行访问.

请记住,我在进行更改后会使用"service mongod restart".

配置文件供参考:

# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0


#processManagement:

#security:
#auth = true
#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options:

#auditLog:
#snmp:
Run Code Online (Sandbox Code Playgroud)

数据库快照供参考:

数据库

出了什么问题?

database authentication mongodb

4
推荐指数
1
解决办法
2万
查看次数

在JavaFX中堆叠图表

我在JavaFX中使用BarChart和LineChart.当我将两个图表制作成相同尺寸并将它们放在同一个地方时,它们会完美地相互重叠.如何让LineChart显示在BarChart的顶部.

目前我一直将不透明度设置为0.7,所以他们"看起来很好",但显然这不是可行的方法.

javafx linechart bar-chart javafx-8

3
推荐指数
2
解决办法
4347
查看次数

在v8-debug@0.4.6安装脚本'node-pre-gyp install --fallback-to-build失败

使用npm install时出现此问题.(很多其他人都有这个问题以及其他命令/任务).

我正在添加这个问题作为一个已经为很多人工作的解决方案的参考.

node.js npm meanjs npm-install

2
推荐指数
1
解决办法
4108
查看次数

没有 CSS 的 Bootstrap 警报和关闭按钮功能

我想要 Bootstrap 警报和关闭按钮功能。我已经在我的页面头中包含了 JQuery 和 Bootstrap javascript 文件,但不想要其中的 CSS,因为它覆盖了大量的样式。

目前,我已将 Bootstrap 的这些部分添加到我自己的 css 中,以使警报和关闭按钮出现。

.alert {
    padding: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px
}

.alert h4 {
    margin-top: 0;
    color: inherit
}

.alert .alert-link {
    font-weight: 700
}

.alert>p,
.alert>ul {
    margin-bottom: 0
}

.alert>p+p {
    margin-top: 5px
}

.alert-dismissable,
.alert-dismissible {
    padding-right: 35px
}

.alert-dismissable .close,
.alert-dismissible .close {
    position: relative;
    top: -2px;
    right: -21px;
    color: inherit
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1 …
Run Code Online (Sandbox Code Playgroud)

css alert button twitter-bootstrap

1
推荐指数
1
解决办法
5237
查看次数