#AuthenticationFailed Error When Connecting to MongoDB Database

14 messages · Page 1 of 1 (latest)

arctic mothBOT
#

Project ID: N/A

lofty stratus
#

Did you create your database on railway.app ? You can use the environnement variable MONGO_URL to connect to your railway mongo db.

#

If you remove the /my_database, it works?

wise zealot
#

did you try it with mongodb compass too

#

you might need extra flags like ?directConnect

lofty stratus
#

Would you mind posting screenshots ? (Hide your mongodb user and password)

#

The connection

#

Do you absolutely need the /my_database ? I usually just use the MONGO_URL without adding the /database to it.

#

Here's what my mongodb connection looks like:

I just pass the process.env.MONGO_URL

#

I never used a /database on railway.app, I do all my test directly in the root.

soft wren
#

._.

lofty stratus
#

I didn't add any /database, and my "articles" goes under test. I think you should be fine without adding the /test

#

Send me a private message if you want my theme. You can add it manually in the files