Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongolab connection error

Tags:

mongodb

mlab

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

like image 827
Ben Wong Avatar asked Oct 21 '25 13:10

Ben Wong


2 Answers

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.

like image 158
Haojen Avatar answered Oct 27 '25 05:10

Haojen


I got the same error in Ubuntu-18. Initially I logged in as normal user. I typed mongo on the terminal. So I got same above error. So I switched to the root user using sudo -s This time when I typed mongo command on the terminal I'm able to connect mongo server. So I thought this service is not available for the normal user.

like image 40
Kodali444 Avatar answered Oct 27 '25 05:10

Kodali444



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!