Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

How to configure a replica set with MongoDB

$
0
0

I've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question.

Below you can see an overview of my goal.

I want configure Replication Set in MongoDB for that i tried like this

use local
db.dropDatabase()

config = { _id: "rs0", members:[
{_id: 0, host: 'localhost:27017'}]
}

rs.initiate(config)

i hope every thing is correct only but here its showing the following error message

{ "errmsg" : "server is not running with --replSet", "ok" : 0 }

Anything wrong i did here ?

Any ideas ?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>