R
Railway9mo ago
Hys

Failed to authenticate to mongodb

Deploying a MongoDB database from the UI, automatically creates a database named "test" if you connect to the mongourl that plugin gives you, you can only modify that database, if i try to put /main at the end of the URI i get an authentication failure even tho everything is the same, when deploying the plugin it should allow you to select the name of the database you want instead of creating the "test" database. How can i connect to the "whatsapp" database? Currently trying: mongodb://mongo:PASSWORD@containers-us-west-167.railway.app:6204/whatsapp but this returns the authentication failure mongodb://mongo:PUzWbpv1IF0unHlAUaPS@containers-us-west-167.railway.app:6204 connects successfully but only to the "test" database that was created automatically. The project is in typescript and i'm using mongoose, didn't had this issue while using ATLAS
18 Replies
Percy
Percy9mo ago
Project ID: 8cced2b9-8279-433a-b3da-fdd6b88a3b56
Hys
Hys9mo ago
8cced2b9-8279-433a-b3da-fdd6b88a3b56 even if i manually delete the "test" database it self creates again when connecting
Brody
Brody9mo ago
normally I'd just at the fact you said WhatsApp, but Angelo has told me you are using whatsapp for business, so you're safe lol so you have created a new database named whatsapp right?
Hys
Hys9mo ago
yes sir it even shows up in compass connecting without /whatsapp at the end works just fine, the problem that it auto creates a database named "test" using /whatsapp throws an autentication error
Hys
Hys9mo ago
yes, i'm using mongoose Connecting like this: mongodb://mongo:happypassword@containers-us-west-144.railway.app:7063/ works Connecting like this: mongodb://mongo:happypassword@containers-us-west-144.railway.app:7063/whatsapp doesnt even tho the database exists, and even if it doesn't it would auto create it
Brody
Brody9mo ago
i know, one sec
Hys
Hys9mo ago
Thank u
Brody
Brody9mo ago
No description
Brody
Brody9mo ago
specify your whatsapp database there
Hys
Hys9mo ago
okay let me try ibe sec
Hys
Hys9mo ago
it connects, but it still uses the "test" database
No description
Hys
Hys9mo ago
ok wait im braindead didn't commit
Brody
Brody9mo ago
did you omit the test from the original url? lol
Hys
Hys9mo ago
yes, let me redeploy ok, success thank you
Brody
Brody9mo ago
no problem!
Hys
Hys9mo ago