# Connect database mongodb forum

**URL:** <https://discuss.openedx.org/t/connect-database-mongodb-forum/11045>\
**Category:** Site Operations Help\
**Created:** [August 26, 2023, 2:04am UTC](https://discuss.openedx.org/t/connect-database-mongodb-forum/11045 "2023-08-26T02:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TNS\_FX1838](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/tns_fx1838/32/5280_2.png) [@TNS\_FX1838](https://discuss.openedx.org/u/TNS_FX1838)\
**Post date:** [August 26, 2023, 2:04am UTC](https://discuss.openedx.org/t/connect-database-mongodb-forum/11045/1 "2023-08-26T02:04:44Z")

</div>

Hello everyone,

I have created a user to connect to the MongoDB database of the forum using the command:

```auto
use FORUM_MONGODB_DATABASE
db.createUser({
  user: "MONGODB_USERNAME",
  pwd: "MONGODB_PASSWORD",
  roles: ["dbAdmin", "readWrite"],
  passwordDigestor: "server"
})

```

However, when I try to access the Discuss page, I encounter an error

```auto
Mongo::Error::OperationFailure: [13:Unauthorized]: command find requires authentication (on 3.1.196.228:27017, modern retry, attempt 1)&gt;

```

Can anyone help me understand why this is happening?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/e0015f89e879bc75925b71fd11133ab15fe98297.png) [@system](https://discuss.openedx.org/u/system)\
**Post date:** [November 24, 2023, 2:05am UTC](https://discuss.openedx.org/t/connect-database-mongodb-forum/11045/2 "2023-11-24T02:05:05Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
