1. 程式人生 > >啟動mongodb 出現errmsg" : "This node was not started with the replSet option"

啟動mongodb 出現errmsg" : "This node was not started with the replSet option"

解決方法:
1、先啟動sudo service mongod start
2、關閉sudo service mongod stop
檢視狀態sudo service mongod status
顯示dead
3、再開一臺終端執行
mongod --port=27001 --dbpath=./data/db --replSet=rs0
2、在另一臺啟動
mongo --port 27001