I am running mongo 2.2.2 on osx.
When I do the following authentication is going fine:
$ mongo >> use admin >> db.auth(\"uname\", \"passw
This is the way to access an authenticate MongoDB database from terminal
mongo -u user_name -p "your_password" host_name/database_name
Ex:
mongo -u hasib -p "123456" localhost/my_db