登陆控制台
cd /home/mongodb/bin
./mongo
设置test表,访问权限账号root
use test
db.createUser({user:'root',pwd:'123456',roles:[{role:'dbOwner',db:'test'}]});
cd /home/mongodb/bin
./mongo
use test
db.createUser({user:'root',pwd:'123456',roles:[{role:'dbOwner',db:'test'}]});