I install MongoDB with MongoDB one click install. I need to connect it with my app from other DO server. I need username, password, and db name. How do I find out these?
Thank you
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
By default, MongoDB does not have a user or password set. It is secured by restricting access to the local loopback interface. There are a number of different ways that you can set up authentication. The MongoDB security checklist is a good starting point for the options available. This tutorial covers some basics about DigitalOcean’s MongoDB One-Click including opening it up for external access:
The default database name is simply
test
If you enter the MongoDB shell by running themongo
command, typingdb
will return the name of the database.use
can be used to switch databases. If the database didn’t exist yet, it will be created. For instance,