I have a standalone Mongo instance running a replica set. I can't seem to connect and run any queries in the Mongo shell however. I get the following:

error: { "$err" : "not master and slaveOk=false", "code" : 13435 }

I set SlaveOk like so:

db.getMongo().setSlaveOk()

..but I still get an error:

error: {
"$err" : "not master or secondary; cannot currently read from this replSet member",
"code" : 13436
}

I can't seem to find a straight answer on Google: how do I connect to my replica set using the mongo shell?

Edit
Report