I am following MongoDB tutorial: https://www.youtube.com/watch?v=QSO4vIePxqs and i am getting an Timeout error while i run app.
while i used this connection string i.e: mongodb+srv://<username>:<password>@cluster0.qlyqjcs.mongodb.net/?retryWrites=true&w=majority
it gives invalid String Error but when i use above String without +srv its give timeout Error.
am i using correct string ?
Note: i am using username and password correctly.
Please help me.
Hi @Muhammad Bilal ,
The solution is to encode the colon : using %3A . Similarly, if you used @ symbol in Password so you should replace it with %40 .
Real Password : Testing@123
In Connection String Password : Testing%40123
"mongodb://Usernag111:Testing%40123@cluster0.rxc1bef.mongodb.net/"
"mongodb://Usernag111%3ATesting%40123@cluster0.rxc1bef.mongodb.net/"
Both are working fine ,
Note: Only encode the password. The : and @ are also used in the connection string as delimiters which should go untouched.
Thanks
This Error occurrs when i used %3A insted of :
i am not using @ in password.
This is not for Mobile
Please use this one
Try to use this Forge this is for Mobile and Reactive.
OR
When you copy connection string
Follow the step .
In my case it is working in both
connection string Driver and Compass
let me try.
Thanks a lot.
Hi @Harshit Nag
it not working for me.
bye the way Thanks.
You changed the Forge ?
yes, i am using MongoDB Connector now.
i install MogoDB connector below snap (and unistall MongoDB using before).
i refreshed dependencies in my app.
use connection String as advise by you. but it didnot work.
Refer this OML.