Pls I posted an image b4 but due to the fact I couldn’t send all at once so I just sent only one image bcos ama new user pls can u use the images below to match the ones sent b4
Pls I posted an image b4 but due to the fact I couldn’t send all at once so I just sent only one image bcos ama new user pls can u use the images below to match the ones sent b4
Pls I posted an image b4 but due to the fact I couldn’t send all at once so I just sent only one image bcos ama new user pls can u use the images below to match the ones sent b4. Pls can u check the mongodb connection url to see if that’s where the error is below
MongoDB Connection String | Introduction | MongoDB | MongoDB.
Refer here for how to connect. Go through step by step and read all instructions. The connection string should look like this
mongodb+srv://<username>:<password>@beyondthebasics.abcde.mongodb.net/test
Okay so that means I should input this in my “mongodb url=” in the last image I sent to u? The connection string u just sent to me?
With the url those <> should not be there. Those are placeholders. So when you see <username>
in the example, you would put myusername
Ooh okay so for password I should also put “mypassword” instead of what is my password in mongodb?
Pls Ì just want to clarify something to understand more
No, don’t put “mypassword”
If my password is abc123, I should put abc123.
All I’m saying is, MongoDB signals that you should insert your own username and password by using the brackets <>, but the brackets should not be included in the final string.
The instructions are all in here:
These are very thorough and you should refer to them for all your questions before asking here, because they’re a primary source.
Good day sir pls I followed the instructions carefully even from the images I will provide below u will see that I understood what u said and followed it but it’s still giving me some errors though, the images provided would explain more
Bad auth authentication failed means wrong user id & password combination
Please check if your are giving correct id/pwd
Can you connect to your DB using mongo shell with same credentials?
Your connection string is formatted correctly so well done there. Yes double check the username and password.
Another way you can test your connection is using MongoDB Compass. https://www.mongodb.com/try/download/compass
This could help you rule out errors you might be making in Node.js. If you can copy/paste the url string in there and it connects, you know the string is solid. If that fails it’s most certainly an incorrect username password combo.
If indeed your password is the problem, follow the instructions for creating the password again
Okay thankß wilk try that
Okay sir I followed the instructions on how to create a new password, but b4 I did that I created another new account in mongodb thinking that maybe I changed somethings or inputted something the last time I worked using mongodb that’s why I am facing the issues but I was wrong I was using the same password to sign in to mongodb thinking it was the one that I will put into my connection string but I was wrong
I created another account so my password was auto-generated just like my other account the password was auto-generated to cut the long story slhort after the second tme of add a new database user I was able copy the autogenerated password then paste with my username I created again when I ran yarn start it showed this. Thank u soo much sir for ur time I appreciate it
Yes sir I finally was able to do it, my last reply with Mr Justin Jaeger explains more. This is the result though
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.