Ofek Saroussi
Ofek Saroussi

Reputation: 31

Failed to connect mongodb server

when i tired to connect mongodb server i got that error:

MongoDB shell version v3.4.4
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.4
2017-06-08T12:14:38.297+0300 I STORAGE  [main] In File::open(), ::open for '/Users/ofekseroussi/.mongorc.js' failed with Permission denied
The ".mongorc.js" file located in your home folder could not be executed

How do I fix it.? thank you !

Upvotes: 3

Views: 1433

Answers (1)

Aboozar Rajabi
Aboozar Rajabi

Reputation: 1793

You can delete the .mongorc.js file and the problem would be solved. To do this in macOS you can use cd ~/&&ls -al, if you see .mongorc.js that is owned by the root user, so you can use sudo rm .mongorc.js to delete it.

Upvotes: 1

Related Questions