Trouble connecting Compass to the mLab mongodb cloud service

Independent of this course, I’ve been working with an alternative mongodb cloud service offering provided by mLab – this is comparable to Atlas. Using a mongo shell at the Command Prompt I’ve connected successfully. I’m failing however when trying to connect via Compass. mLab does not seem to provide a cluster name. Instead they use something they call a standard Mongodb URL with a form similar to:
mongodb://:@ds125385.mlab.com:25385/mongo-proj. How would I translate this into a cluster name usable by Compass?

Hi @richard_straka_33236,

Thanks for asking a question like this. I have not used mlab yet.

Found the following steps here:

A. go to your db in mlab and in the tab choose "users" [exmple_img](https://i.stack.imgur.com/v07Ke.png)

B. create a new user ex: username: admin password: 123456

C: go to compass and fill it this way 

example of your connection path : ds012345.mlab.com:56789/myDBname

hostname: ds012345.mlab.com

port: 56789

Authentication: username /password

Username: admin // or the name of the user you created in step A

Password: password for the user you created in step A

Authentication Database: myDBname // the name of your database in mlab 

Let me know if it works for you!

Kanika

Kanika, thanks for the help, the link you provided provided the answer!!

A suggestion – My goal in using mongodb is to create a repository for storing/retrieving pictures, pdf, xml, word docs. The user interface ideally will be built using JavaScrips. I know that his will involve using the data type of “binary”. How command prompt mongo or Compass will handle such type of data would have been of interest. Is there a different cause you provide which would help me?

Richard Straka

Hi richard_straka_33236,

You can use GridFS to store large amount of binary data like for images, pdfs etc. Mongo will store the data as binary data. And in Compass as well, it will be shown as binary data.

For more details, please refer this link: https://docs.mongodb.com/ecosystem/use-cases/metadata-and-asset-management/

Let me know if you need help.

Kanika