還原指定的數(shù)據(jù)庫:
mongorestore -d wkcms /opt/bak/wkcms? #wkcms這個數(shù)據(jù)庫的備份路徑
導(dǎo)出指定的數(shù)據(jù)庫:
mongodump -d daye -o /opt/bak
創(chuàng)建用戶:
db.createUser({user: "wkcms",pwd: "wkcms",roles: [{role: "readWrite",db: "wkcms"}]})
還原指定的數(shù)據(jù)庫:
mongorestore -d wkcms /opt/bak/wkcms? #wkcms這個數(shù)據(jù)庫的備份路徑
導(dǎo)出指定的數(shù)據(jù)庫:
mongodump -d daye -o /opt/bak
創(chuàng)建用戶:
db.createUser({user: "wkcms",pwd: "wkcms",roles: [{role: "readWrite",db: "wkcms"}]})