Can't connect to MongoDB with authentication enabled

前端 未结 2 402
花落未央
花落未央 2021-01-06 06:57

I\'m running the latest MongoDB for Ubuntu 14.04

  • I have created a user named \"admin\" with \"userAdminAnyDatabase\" role
  • I can access databases local
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-06 07:23

    1. Did you follow the instructions in Enable Client Access Control to create the user and enable authentication?

    2. What is the output of your log, when you try to access mongoDB with credentials?

    3. Did you tell mongoDB somewhere to use the config file? Try to start mongoDB locally on the PC mongoDB is running with mongod --config ../etc/mongod.conf and then try to connect from your Windows PC like you did before.

提交回复
热议问题