title: Connecting to Mongo in Replica set mode
body: <p>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:</p>
  
  <p><code>error: { "$err" : "not master and slaveOk=false", "code" : 13435 }</code></p>
  
  <p>I set SlaveOk like so:</p>
  
  <p><code>db.getMongo().setSlaveOk()</code></p>
  
  <p>..but I still get an error:</p>
  
  <pre><code>error: {
  "$err" : "not master or secondary; cannot currently read from this replSet member",
  "code" : 13436
  }
  </code></pre>
  
  <p>I can't seem to find a straight answer on Google: how do I connect to my replica set using the mongo shell?</p>