R
Railway15mo 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:[email protected]:6204/whatsapp but this returns the authentication failure mongodb://mongo:[email protected]: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
Percy15mo ago
Project ID: 8cced2b9-8279-433a-b3da-fdd6b88a3b56
Hys
HysOP15mo ago
8cced2b9-8279-433a-b3da-fdd6b88a3b56 even if i manually delete the "test" database it self creates again when connecting
Brody
Brody15mo 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
HysOP15mo 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
HysOP15mo ago
yes, i'm using mongoose Connecting like this: mongodb://mongo:[email protected]:7063/ works Connecting like this: mongodb://mongo:[email protected]:7063/whatsapp doesnt even tho the database exists, and even if it doesn't it would auto create it
Brody
Brody15mo ago
i know, one sec
Hys
HysOP15mo ago
Thank u
Brody
Brody15mo ago
No description
Brody
Brody15mo ago
specify your whatsapp database there
Hys
HysOP15mo ago
okay let me try ibe sec
Hys
HysOP15mo ago
it connects, but it still uses the "test" database
No description
Hys
HysOP15mo ago
ok wait im braindead didn't commit
Brody
Brody15mo ago
did you omit the test from the original url? lol
Hys
HysOP15mo ago
yes, let me redeploy ok, success thank you
Brody
Brody15mo ago
no problem!
Hys
HysOP15mo ago
Want results from more Discord servers?
Add your server