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.
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}
mongo
use {db_name}
db.{collection}.find()
Figured it out finally. Leaving the answer here in case someone else stumbles upon it:
ssh user@address.com
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