Connecting to mongoDB 3.0.x


#1

I am trying to connect to a MongoDB being hosted by mLab. It wont let me log in via the shell in c9. After speaking to an mLab rep they told me that the shell I am trying to use may not be compatible with their version of MongoDb.

Any assistance in trouble shooting this is appreciated.


#2

I was able to solve this issue with assistance from stack overflow. If moderators leave this up, I’ll attach the solution I obtained from stackoverflow for future users.

The first thing you have to do is to remove the existing mongodb:

sudo apt-get remove mongodb* --purge

Then we can follow instructions from MongoDB docs.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo “deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org


#3

Thank you for sharing this.
I just have one question: How do I receive my ubuntu key?