title: How do I use pymongo to connect to an existing document collection/db?
body: <p>On the command line, this works:</p>
  
  <pre><code>$ mongo
  &gt; show dbs
  mydatabase   1.0GB
  </code></pre>
  
  <p>However, this does not:</p>
  
  <pre><code>$ python    
  &gt;&gt;&gt; import pymongo
  &gt;&gt;&gt; connection = pymongo.MongoClient()
  &gt;&gt;&gt; connection.mydatabase.find()
  </code></pre>
  
  <p>I read through docs here:</p>
  
  <p><a href="http://api.mongodb.org/python/current/tutorial.html" rel="noreferrer">http://api.mongodb.org/python/current/tutorial.html</a></p>
  
  <p>But do not understand how to either...</p>
  
  <ol>
  <li>connect to an existing database (using pymongo)</li>
  <li>query what databases exist in the mongodb connection.</li>
  </ol>
  
  <p>Why can't I access my database?</p>