Server connection with MongoDB C++ Interface

2 views (last 30 days)
Arda Aksu
Arda Aksu on 3 Jan 2022
Commented: Arda Aksu on 10 Jan 2022
According to the documentation of new mongodb c++ interface, a server name is required to connect a mongodb server. The format of the connection link for mongodb is below:
I have a <cluster-url> like this;
For server name, I have tried every combination of this string, but I can not connect. I have also tried to look into the connect function but apperantly it is encrypted.
How can I connect to a mongodb server using mongoc function?
Kind regards,

Answers (1)

Abhishek Kolla
Abhishek Kolla on 6 Jan 2022
You can refer to mongoc for more information on the server name. In addition you would also need to install the Additional Support Package for mongo DB connection, as explained in the following documentation page:
Hope this helps
  1 Comment
Arda Aksu
Arda Aksu on 10 Jan 2022
The additional add-on you mention is for java drivers. In the documentation, it seems that mongoc function uses c++ library and is already included in database toolbox.
The problem is I dont know what to use as server name because every other platform that works with mongoDB uses an url to connect to the database.
The connection link for mongodb is below:
I have a <cluster-url> like this;
What should I use as server name in mongoc function?

Sign in to comment.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by