0

I have two servers, one for app(rails) and one for db(mongo).My rails config for mongo will be like this(yaml file):

hosts:
  - xxx.xxx.xxx.xxx:57777
database: admin
username: root
password: some_password

So.. how can I configure on the mongo server including the 57777 port, password for root user?

0

For the port you need to start mongod with parameter --port 57777 . Alternative place it on the configuration file under

net: port: 57777

For the username and password part you need to enable security by start mongod with parameter--auth . Alternative place it on the configuration file under security.authorization = enable Then you can create the username:root assign a password and certain privileges.

More can be found here: http://docs.mongodb.org/manual/core/authorization/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.