问题
I'm getting the following message when I try connecting to MongoLab with the command:
mongo ds035438.mongolab.com:35438/comeventsbw -u (myusername) -p (mypassword)
MongoDB shell version: 3.0.6 connecting to: ds035438.mongolab.com:35438/comeventsbw 2015-12-10T10:30:18.537-0700 I STORAGE In File::open(), ::open for '/Users/benwong/.mongorc.js' failed with errno:13 Permission denied The ".mongorc.js" file located in your home folder could not be executed
回答1:
You can try to delete the root directory .mongorc.js
file. To do this in mac OS you can use cd ~/&&ls -al
, if you see .mongorc.js
that is owned by root, so we can use sudo rm .mongorc.js
to delete it.
来源:https://stackoverflow.com/questions/34208373/mongolab-connection-error