MongoDB read-only user not authenticating

MongoDB read-only user not authenticating



I'm currently attempting to create a read-only user in MongoDB for a grader. The MongoDB instance is hosted remotely on AWS EC2, and the security groups are all set up properly.



I can SSH onto the remote machine and authenticate with the read-only account there, like so:


# On remote machine
mongo -u <read-only username> -p <read-only-pwd> <database>



However, as soon as I try to connect to that same instance from my local machine using mongo, I encounter authentication errors.


mongo


# On local machine
mongo -u <read-only username> -p <read-only pwd> <host>/<database>



What gives?



The read-only user exists on <database>, and has "read" permissions.


<database>


"read"






When you say encounter authentication errors what do you mean? Please provide error message.

– Oscar Nevarez
Sep 17 '18 at 2:21




1 Answer
1



Check that you're not trying to authenticate with the wrong machine.



I'm an idiot.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




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

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

Node.js puppeteer - Use values from array in a loop to cycle through pages