-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect to remote Mongo server #55
Comments
According to spec of connect :
Database should be binary or atom, UserName and Password should be binaries, write and read modes should be atoms. |
Thank you a lot for response soon! iex> :mongo.connect(:db_name, "account", "password", :safe, :master, [{"host", "example.com"}, {"port", 27017}])
** (EXIT from #PID<0.88.0>) {:errmsg, "auth failed", :code, 18} And still face the same error. Do you have any idea about this problem? |
We've solved the connection issue by modify code to this: :mongo.connect(:db_name, "account", "password", :safe, :master, [{:host, 'example.com'}, {:port, 27017}]) Thank for your supporting. |
This driver seems very nice. I use it in my elixir project.
This is my code to connect to my remote mongo server. But it returns error.
(I've tried to connect by my local mongo client and it works.)
Is this right format of the :mongo.connect/6 command when use in elixir?
Please help me!
The text was updated successfully, but these errors were encountered: