简体   繁体   中英

Unable to connect to MongoDB using password hash

My question is similar to this one insofar as I am trying to make a mongo shell connection to database that Heroku auto-provisioned on MongoHQ (Now called Compose): Unable to connect to mongohq at heroku using shell

The only details that I have about this database are from the Heroku Environment Variable:

MONGOHQ_URL

mongodb://heroku:yQso1cKxxxxob0RVaUy_mLN_sO0hPloxxxxxxAmEs-g@flame.mongohq.com:27066/app5xxx6

It would seem that the 'big long string' part is a username / password hash...

How can I use the above connection string to make a mongo shell connection to the database?

Is there a way, through Heroku. MongoHQ to get the actual username and password? I don't have a MongoHQ account, only a Heroku account.

This seems to be a misunderstanding. There is no hashing going on.

The user name is "heroku"

And the password is - ' the big long string '

So the solution is:

mongodb flame.mongohq.com:27066/app5xxx6 -u heroku -p o95y8unw74bxYWM_THE_BIG-LONG-STRING

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM