Encountered a MongoDB warning after converting a replica set to stand alone server

前端 未结 2 1406
温柔的废话
温柔的废话 2021-01-11 10:15

I encountered the following warning after converting a mongodb replica set to a stand alone server. I did rs.remove(\'host\') and removed the replSet arguments when starting

相关标签:
2条回答
  • 2021-01-11 11:03

    The local database contains replica set information among other things. You can drop the local database without ill effect.
    Use the following comments to drop the local database.

    use local
    db.dropDatabase()
    

    The warning messages should go away after restarting mongod

    0 讨论(0)
  • 2021-01-11 11:10
    use local;
    db.dropDatabase();
    db.system.replset.remove ({});
    

    Quit the mongo shell .. restart service just in case "service mongod restart"

    mongo --host bind_ip --port bind_port
    
    0 讨论(0)
提交回复
热议问题