MongoDB 3.2 authentication failed

前端 未结 4 1603
萌比男神i
萌比男神i 2020-11-29 02:06

I create a user with the following set of commands. This should create user in both admin db as well as my target db (c2d):

# mongo 127         


        
4条回答
  •  执念已碎
    2020-11-29 02:22

    Our experience with this issue on MongoDB (3.2.4) is that it seems a bug or a undocumented feature. If you attempt to create the users and roles from a remote shell (not localhost), the users are created but as soon as you leave the shell they are gone (they are transient to that session) and not really persisted.

    Solution: Just try to create your users (without authentication enabled initially on MongoDB) and do it directly on the console of your DB server (localhost).

提交回复
热议问题