I want to connect the firsthift mongodb database from my local client tools

  • I have my premiumhift account.
  • I have all types of access in openshift
  • I have an ssh key and user credentials
  • I have MongoVUE and Robomongo and other client tools to open mongodb database.
  • when I try to open any local mongodb database, then its working function
  • but I want to connect my mongodb database directly to the openshift server to mongoVUE or whatever else so I can see what data is in my server database.
  • I tried many times to connect locally, but it can connect to openshift, but cannot connect to the mongodb database, so please provide some good and accurate steps so that I can connect to it.
+6
source share
2 answers

Finally, I got a great tool for connecting to mongodb with a server database, in which we can perform all kinds of CRUD operations. we can use the Robomongo tool for it, which does not require a paid version to perform CRUD operations. Robomongo is available here http://robomongo.org/download.html mongoVUE requires a paid version.

I am using Robomongo. Just do 'rhc port-forward'

Then start Robomongo using the Mongodb credentials that OPENHIFT provided you.

Steps

rhc port-forward Wait a couple of seconds. You should see something like this.

port forward image

Then run Robomongo. Add a connection and enter your Openshift Mongodb credentials:

+4
source

I also use mongov. Just do 'rhc port-forward'

Then run mongovue using the Mongodb credentials that OPENHIFT provided you.

Steps

rhc port-forward <app-name> 

Wait a couple of seconds. You should see something like this.

port forward image

Then run Mongovue. Add a connection and enter your Openshift Mongodb credentials as follows:

Mongovue

Save, select your connection and click connect. It should work.

You should provide you the mongodb credentials when you added the mongodb cartridge. You can also use ssh in your application and make "env" and see your password and mongodb username.

+8
source

Source: https://habr.com/ru/post/978441/


All Articles