R
Railway14mo 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
Percy14mo ago
Project ID: 8cced2b9-8279-433a-b3da-fdd6b88a3b56
Hys
Hys14mo ago
8cced2b9-8279-433a-b3da-fdd6b88a3b56 even if i manually delete the "test" database it self creates again when connecting
Brody
Brody14mo 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
Hys14mo 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
Hys14mo 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
Brody14mo ago
i know, one sec
Hys
Hys14mo ago
Thank u
Brody
Brody14mo ago
No description
Brody
Brody14mo ago
specify your whatsapp database there
Hys
Hys14mo ago
okay let me try ibe sec
Hys
Hys14mo ago
it connects, but it still uses the "test" database
No description
Hys
Hys14mo ago
ok wait im braindead didn't commit
Brody
Brody14mo ago
did you omit the test from the original url? lol
Hys
Hys14mo ago
yes, let me redeploy ok, success thank you
Brody
Brody14mo ago
no problem!
Hys
Hys14mo ago
Want results from more Discord servers?
Add your server