DB Commands

    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
    
    標籤 (Edit tags)
    • No tags

    文件 1

    文件大小日期附件上傳者 
     10gen-MongoDB_Operations_Best_Practices.pdf
    MongoDB Operations Best Practices
    1931 KB09:46, 12 Aug 2018alang動作
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core