익명 19:10

Problems connecting using MongoDB Compass

Problems connecting using MongoDB Compass

I'm trying to see the contents of a collection using MongoDB Compass. I have username/password authentication set up. I can log in successfully but can't see any documents in the collection. Instead, I see the error:

An error occurred while loading navigation: command hostInfo requires authentication.

Here are the list of roles the user has:

 "roles" : [
                {
                        "role" : "readWrite",
                        "db" : "moviesDB"
                },
                {
                        "role" : "dbAdmin",
                        "db" : "moviesDB"
                },
                {
                        "role" : "dbOwner",
                        "db" : "moviesDB"
                },
                {
                        "role" : "clusterMonitor",
                        "db" : "admin"
                },
                {
                        "role" : "dbAdmin",
                        "db" : "moviesDB"
                }
        ]

I can successfully query the collection using mongo shell and node.js driver but not through Compass. If someone could tell me what I'm doing wrong I'd appreciate it. Thanks in advance!



Top Answer/Comment:

I have found that the number one cause of simple auth issues through MongoDB administration apps such as 3T and Compass is in properly specifying the authentication database. Make sure that the authentication database of the user that you are attempting to log in as is properly set.

Beyond this, it would take some screenshots from the Compass login settings to provide more insight. Best of luck!

상단 광고의 [X] 버튼을 누르면 내용이 보입니다