title: MySQLdb python problem refresh database
body: <p>I have wrote a python daemon for read a database... I do the next:</p>
  
  <pre><code>db.connect('localhost', user, pass, database)
  while true:
      cursor = db.cursor()
      sql = "SELECT id FROM task WHERE status='pending'"
      r = cursor.execute(sql)
      if r != 0:
          result = cursor.fetchall()
          #.....
  </code></pre>
  
  <p>The problem is that: when change database, the daemon not detect it... can refresh...
  what can I do??</p>
  
  <p>thanks!!</p>