title: How can I create a database with a user name and password in mongodb in mongodb shell
body: <p>I'm trying to create a database with user name and password, some answers says to addUser for admin .but there isn't any database called in by mongodb.</p>
  
  <p>I run the mongodb with super user privilege.</p>
  
  <pre><code>MacBook:~ root# mongod
  </code></pre>
  
  <p>or</p>
  
  <pre><code> MacBook:~ macbook$ mongo
  </code></pre>
  
  <p>the in new tab I run following command </p>
  
  <pre><code>MacBook:~ root# mongo
  </code></pre>
  
  <p>then I see for my dbs with <code>show dbs</code> command it show followings</p>
  
  <pre><code>&gt;show dbs
  clist  0.078GB
  hinfo  0.078GB
  local  0.078GB
  </code></pre>
  
  <p>I tried with this <code>local</code> database with <code>system.indexes</code> but I didn't get any succesful result. am I wrong with doing this. hope your help. I'm new to mongodb and I'm using <code>monogo 3.2.4 versioin</code></p>