Create Mongodb account

從 Mongodb 3.0 之後的權限設計有改變,這邊記錄一下帳號的設定

use admin
db.createUser(
   {
     user: "admin",
     pwd: "admin",
     roles: [ "readWrite", "dbAdmin" ]
   }
)