Create root user for DB
mongo > use admin > db.createUser({user:"admin", pwd:"admin123", roles:[{role:"root", db:"admin"}]}) vi /lib/systemd/system/mongod.service
ExecStart=/usr/bin/mongod --auth --config /etc/mongod.confsystemctl daemon-reload
// restart Mongod service mongod restart
Connect to DB
mongo -u admin -p admin123 --authenticationDatabase admin
Performance Monitor
mongostat mongotop
文件 | 大小 | 日期 | 附件上傳者 | |||
---|---|---|---|---|---|---|
10gen-MongoDB_Operations_Best_Practices.pdf MongoDB Operations Best Practices | 1931 KB | 09:46, 12 Aug 2018 | alang | 動作 |
Images 0 | ||
---|---|---|
No images to display in the gallery. |