2
$ mongo MongoDB shell version: 2.0.0 connecting to: test > use admin switched to db admin > db.auth('admin', '******') 1 

Then I can connect to other databases and run commands

Then I accidentally hit ctrl-C, so I try to login again.

$ mongo MongoDB shell version: 2.0.0 connecting to: test > use admin switched to db admin > db.auth('admin', '******') 0 

I can no longer auth against the admin collection. I assume this is because my previous login somehow didn't get cleared out, or is locked? How do I fix that?

2
  • Found it! Just needed to get rid of the lock file. For me, this was here: /ap/mongo/data/db/mongod.lock Commented Feb 15, 2012 at 16:54
  • you can add this as an answer and accept it, so it may be useful for someone. Commented Feb 16, 2012 at 7:33

1 Answer 1

1

Found it! Just needed to get rid of the lock file. For me, this was here:

/ap/mongo/data/db/mongod.lock

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.