Search code examples
mongodbherokumlab

What is the default dbuser and dbpassword for a MongoDB database provisioned by Heroku and MongoLab?


I am new to Heroku and MongoDB. I created a Heroku app which has an added-on MongoDB by MongoLab.

Everything was set up automatically by Heroku. When I navigated to MongoLab database manager page (SSO protected) it showed a standard MongoDB URL as:

mongodb://<dbuser>:<dbpassword>@dsxxxxxx.mongolab.com:39674/heroku_xxxxxxxx

Those "x" letters represents numbers.

I didn't bother to specify a dbuser and dbpassword at all. So what is the dbuser and dbpassword?


Solution

  • Mongolab provides you with database hosting services using MongoDB as the database engine. This means you have to have a subscription to their services, in order to have access to a MongoDB database. Once you sign up for one of their plans you will have your own database username and database password to authenticate database connections with.

    So dbuser will be your MongoDb username and dbpassword will be your MongoDB password. You use these elements to gain access to your own databases and collections.

    https://mongolab.com/plans/pricing/