title: Why doesn't my script work, but I can manually INSERT into mysql?
body: <pre><code>conn = MySQLdb.connect(host='db1', user='user', passwd='pass', db='db', port=3306)
  cursor = conn.cursor()
  
  count = int(sys.argv[1])
  x = 0
  while x &lt; count:
      x += 1
      cursor.execute("INSERT INTO auth_group(name) VALUES(%s)", (str(x)))
      #if I change %s to 'kkkk', it doesn't work either.
  
      print str(x) + ' / ' + str(count)
  print 'done'
  </code></pre>
  
  <p>However...if I go into "mysql -uuser -ppass db", it works:</p>
  
  <pre><code>mysql &gt; INSERT INTO auth_group(name) VALUES('kkkkk');
  </code></pre>
  
  <p>I don't know if this could be a problem...but I was having a replication issue earlier.</p>
  
  <p>I would like to INSERT 99999 rows into the database. But it's empty.</p>
  
  <pre><code>mysql&gt; select * from auth_group;
  Empty set (0.33 sec)
  </code></pre>