I have mongodb atlas using srv
and my meteor project cant connect to it
MONGO_URL=mongodb+srv://username:password@beta-6gxq4.azure.mongodb.net/test?retryWrites=true&w=majority meteor run
is there any way to connect mongodb atlas?
I have mongodb atlas using srv
and my meteor project cant connect to it
MONGO_URL=mongodb+srv://username:password@beta-6gxq4.azure.mongodb.net/test?retryWrites=true&w=majority meteor run
is there any way to connect mongodb atlas?
Hi, the last commit related to mongo driver, in Meteor 1.10 b5 refers to âUpdate MongoDB driver to 3.5.2â
SRV is a feature of MongoDB Driver 3.6 https://www.mongodb.com/blog/post/mongodb-3-6-here-to-SRV-you-with-easier-replica-set-connections
It might be that you donât have a driver to connect in that way which I guess leaves you with the âhighly compatibleâ option to connect the known (old) way, listing all replica sets.
Hi, I use Atlas, looking in my settings.json I have a port number on the MONGO_URL for atlas, port 27017
Try that maybe ?
I think thereâs some version confusion here.
The MongoDB driver that is updated by Meteor 1.10 is the Node.js driver. The blog post is about âMongoDB 3.6â. MongoDB 3.6 is compatible with Mongo nodejs drivers 3.0 and above.
My own app for example is on Meteor 1.8, using Node.js driver 1.3, and MongoDB 4.2.
That must be why Atlas gives the srv link to those who connect using the nodejs driver version 3.0 or later:
I am confused however why the linked blog post refers sometimes to âMongoDB 3.6â and sometimes to âdriver 3.6â, as if those are one and the same thing, which doesnât seem to be the case.
3.6 driver = all official drivers compatible MongoDB 3.6
I went thru this see if this helps:
Hi,
I am also having trouble connecting mongo atlas after mlab service was stopped by Heroku.
Iâm unable to connect it on my local meteor app as well as on heroku.
Can anyone help me with this:
set MONGO_URL=mongodb://[username]:[password]@cluster0-shard-00-00-xgnuk.mongodb.net:27017,cluster0-shard-00-01-xgnuk.mongodb.net:27017,cluster0-shard-00-02-xgnuk.mongodb.net:27017/[database]?ssl=true&replicaSet=Cluster0-shard-0&readPreference=primaryPreferred&w=majority&authSource=admin meteor --settings settings.json
MONGO_URL: âmongodb+srv://user:password@pampam.tamtam.mongodb.net/meteor?retryWrites=true&w=majority&connectTimeoutMS=60000&socketTimeoutMS=60000â,
Thank you for reply
But everytime it connects to local default mongo db connection on port 3001 not remote one
Ok in Heroku you have Env Vars where you need to specify the Mongo connection. As for the local station in 7 years in the Node environment I still havenât found a reason to connect a local station to a live DB however, I understand that other people have other needs. This might help you: Connect localhost Meteor JS to remote MongoDB Atlas (2020 tutorial) - YouTube
I suspect you are missing the single quotes.
Hi, Finally itâs working.
Now my website is up finally.
Thank you so much for the suggestions. It helps me a lot!!