How do I access the db/Collections on Digital Ocean for my deployed meteor app with mup?

I am really new to MongoDB and Meteor. I have deployed an App that has a users collection and a few others.

I have installed Mongodb on my mac. I run ‘sudo mongod’ on Terminal then in a new terminal window I run ‘ssh root@myip’ that gets me into the ‘test’ db.

How do I access the db that was deployed with my App? The app is called ‘qpinion’.
I did not add a MONGO_URL in the ‘mup.json’ file because I wansnt sure if I had to and I didn’t know how to write the URL.

Download something like Robomongo and conntect using your SSH credentials.

Downloaded Robomongo but cant seem to figure out how to work it. I’m using the IP for my app as address and ‘27017’ as port. ‘admin’ for Database, root username and my password. But all i get is ‘Failed to connect to IP’.

I have no clue what to do. There’s almost no help available anywhere.

You cannot connect to mongo because there are not any opened mongo interface on the server. I do not recommend you to open it.
But you can connect via terminal:

ssh {server_user}@{server_address}
use {db_name}
1 Like

Thanks for that. That is exactly what I’ve been doing. This gets me into the ‘test’ db, which is empty.

I switch to meteor db using ‘use meteor’ but that is empty too. How do I access the Meteor data?

Figured it out finally. Leaving the answer here in case someone else stumbles upon it:


rm /var/lib/mongodb/mongod.lock       // this removes the old mongo.lock file
mongo —repair
status mongod                         //check status if you want
start mongod                          //if status says waiting/stop, start it
mongo                                 //run it

If you deploying with mup then your database named as your app in mup.json. More over you could see all databases from mongo shell

show dbs
use {db_name}
show collections

Thanks for all the help guys.

So anychance I can connect Robomongo to my MongoDB on Digital Ocean ?

Yeah I still havent worked it out.

This works for me:
ssh -L 27017:localhost:27017

Then, use robomongo with localhost:27017

Hope this helps.

1 Like