- Start up a small sharded cluster with authentication.
- Add an admin user and make sure that user can authenticate
- Run mongostat -u <user> -p <password>
Here's and example of what happens:
$ mongostat -u theadmin -p mypassword
connected to: 127.0.0.1
error:
$ mongostat --username theadmin --password mypassword
connected to: 127.0.0.1
error:
$ mongo
MongoDB shell version: 2.0.0-rc0-pre-
connecting to: test
> use admin
switched to db admin
> db.auth('theadmin', 'mypassword')
1
Maybe I'm missing something obvious.
- related to
-
SERVER-3641 support mongostat through mongos with authentication
- Closed