Access prod database from DigitalOcean

My app is deployed with mupx (credentials user and password) to DigitalOcean.

I was wondering how can i access the dbs and collections on that ubuntu server?

Use MongoChef (via Tab “SSH Tunnel” or Robomongo to connect from your local Laptop to the database, or connect via CLI on the server (command mongo - then "use " and “show collections”)

1 Like

I tried with Robomongo and Mongoclient many times and i won’t connect either to localhost or to deployed database, tried so many times and no luck.

Now i managed to connect via terminat ssh user@x.x.x.x , i did mongo, and it connected to the ‘test’ database.
I would still like to know why i can’t connect via Robomongo or any other GUI :-/

Assuming your mongo is running at :27017, you can do this:

ssh -L 4001:localhost:27017 root@yourdomain.com

And then in robomongo, just connect to localhost:4001.

I’ve been down this rabbithole too many times to recommend trying anything else…

For me it is working (to DO server) via Mongochef:
Tab “Server” localhost:27017
Tab “SSh Tunnel” Check “use SSH Tunnel to connect”, SSH Adress: Server Address, SSH User Name: your linux user (ie root), SSH Auth Mode: password, SSh Password (i.e. root password)

1 Like

Thank you Thank you Thank you!
It works for me too!
Now i can finally “see” the databases like a human being :slight_smile: