配置副本集以使用 Oplogging

副本集將需要 oplog 使用者來訪問資料庫。

mongo

PRIMARY> use admin
PRIMARY> db.addUser({user:"oplogger",pwd:"YOUR_PASSWORD",roles:[],otherDBRoles:{local:["read"]}});
PRIMARY> show users