In your first example, you authenticated against a DB named pat, in your
second example you authenticated against a DB named patsdb. If you change
patsdb to pay on your second example, it should work.
On Tuesday, April 26, 2016 at 11:12:55 AM UTC-4, Patrick Coleman wrote:
I have mongoldb 3.2.5 set up on Ubuntu 14.04. I have authentication
db.auth command when
I can connect as admin user from the command line.
mongo admin -u admin -p password
I can also just connect to mongo and use db.auth to become admin like..
switched to db admin
I have created another user(pat) that I can authenticate as using the
connected to mongodfailed. :
use patswitched to db pat
but I can't connect from the command line like this..
mongo patsdb -u pat -p password
MongoDB shell version: 3.2.5
connecting to: pat
2016-04-26T10:53:49.714-0400 E QUERY [thread1] Error: Authentication
DB.prototype._authOrThrow@src/mongo/shell/db.js:1441:20accepted from 127.0.0.1:50510 #10 (1 connection now open)
exception: login failed
In the mongod.log file I get
2016-04-26T11:09:59.482-0400 I NETWORK [initandlisten] connection
2016-04-26T11:09:59.497-0400 I ACCESS [conn10] SCRAM-SHA-1authentication failed for pat on patsdb from client 127.0.0.1 ;
AuthenticationFailed: SCRAM-SHA-1 authentication failed, storedKey mismatch
127.0.0.1:50510 (0 connections now open)
2016-04-26T11:09:59.498-0400 I NETWORK [conn10] end connection
Does anyone know what's going on?
You received this message because you are subscribed to the Google Groups
For other MongoDB technical support options, see:
You received this message because you are subscribed to a topic in the
Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.