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!
mongodb database-connection database-administration mongodb-compass
add a comment |
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!
mongodb database-connection database-administration mongodb-compass
can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29
add a comment |
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!
mongodb database-connection database-administration 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!
mongodb database-connection database-administration mongodb-compass
mongodb database-connection database-administration mongodb-compass
edited Aug 17 '18 at 20:02
Akrion
9,41711224
9,41711224
asked Aug 17 '18 at 19:59
wiccckedwicccked
408
408
can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29
add a comment |
can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29
can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29
can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29
add a comment |
2 Answers
2
active
oldest
votes
I too got stucked in the same problem. It helped me out:-
Try this
cmd-1:
use admin
db.createUser({
user: "newUsername",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
})
cmd-2:
db.grantRolesToUser('newUsername',[{ role: "root", db: "admin" }])
Let me know if this also helps you out.
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
add a comment |
Kill the mongodb compass processes running, and re-launch compass.
1
this saved me the day!
– ace
Jan 5 at 10:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51902136%2fconnecting-using-mongodb-compass%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I too got stucked in the same problem. It helped me out:-
Try this
cmd-1:
use admin
db.createUser({
user: "newUsername",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
})
cmd-2:
db.grantRolesToUser('newUsername',[{ role: "root", db: "admin" }])
Let me know if this also helps you out.
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
add a comment |
I too got stucked in the same problem. It helped me out:-
Try this
cmd-1:
use admin
db.createUser({
user: "newUsername",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
})
cmd-2:
db.grantRolesToUser('newUsername',[{ role: "root", db: "admin" }])
Let me know if this also helps you out.
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
add a comment |
I too got stucked in the same problem. It helped me out:-
Try this
cmd-1:
use admin
db.createUser({
user: "newUsername",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
})
cmd-2:
db.grantRolesToUser('newUsername',[{ role: "root", db: "admin" }])
Let me know if this also helps you out.
I too got stucked in the same problem. It helped me out:-
Try this
cmd-1:
use admin
db.createUser({
user: "newUsername",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
})
cmd-2:
db.grantRolesToUser('newUsername',[{ role: "root", db: "admin" }])
Let me know if this also helps you out.
answered Sep 17 '18 at 10:28
Abhishek_ItachiAbhishek_Itachi
896
896
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
add a comment |
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
Also try by killing the MongoDBCompassCommunity.exe from processes and then restart your compass again and try login with credentials.
– Abhishek_Itachi
Sep 17 '18 at 10:32
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
The first option worked! (I didn't try the second one) Thank you so much! I already gave up hope to have it resolved =)
– wicccked
Sep 17 '18 at 12:03
2
2
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
Restarting MongoDB Compass solved the issue for me. Just updating the MongoDB access rights correctly was not enough, but Compass restart was needed.
– Jarno P.
Oct 28 '18 at 10:10
add a comment |
Kill the mongodb compass processes running, and re-launch compass.
1
this saved me the day!
– ace
Jan 5 at 10:36
add a comment |
Kill the mongodb compass processes running, and re-launch compass.
1
this saved me the day!
– ace
Jan 5 at 10:36
add a comment |
Kill the mongodb compass processes running, and re-launch compass.
Kill the mongodb compass processes running, and re-launch compass.
answered Nov 20 '18 at 19:30
barrypickerbarrypicker
4,36624153
4,36624153
1
this saved me the day!
– ace
Jan 5 at 10:36
add a comment |
1
this saved me the day!
– ace
Jan 5 at 10:36
1
1
this saved me the day!
– ace
Jan 5 at 10:36
this saved me the day!
– ace
Jan 5 at 10:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51902136%2fconnecting-using-mongodb-compass%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown

can you share what all entries you made in mongodb compass?
– richi arora
Aug 21 '18 at 15:29