1、启动mongodb

cd /usr/local/mongodb/bin
./mongod -f /usr/local/mongodb/etc/mongodb.conf

2、连接mongodb

cd /usr/local/mongodb/bin
./mongo
use admin
db.auth('user','passwd')

results matching ""

    No results matching ""