title: MySQLdb : why does .commit() don't change the result of a query on another client?
body: <p>I'm using MySQLdb on two computers and connect it to the same MySQL database. This database contains a database named <code>dbtest</code> with a table <code>test</code> with 50 rows, defined as following :</p>
  
  <pre><code>CREATE TABLE test (
      id int PRIMARY KEY AUTO_INCREMENT,
      val varchar(255)
  )
  </code></pre>
  
  <p>I use the interpreter in order to setup the problem :</p>
  
  <pre><code># Run this on the 2 computers Python interpreter :
  import MySQLdb
  connection = MySQLdb.connect(host="&lt;database hostname&gt;", user="root", passwd="&lt;root password&gt;")
  cursor = connection.cursor()
  cursor.execute("USE dbtest")
  print cursor.execute("SELECT * FROM test")  # will print 50.
  </code></pre>
  
  <p>All right. The two connections are setup. Now let's add a row with the first client :</p>
  
  <pre><code># Run this on computer 1 :
  cursor.execute("INSERT INTO test (val) VALUES ('gosh stackoverflow is so good !')")
  connection.commit()
  print cursor.execute("SELECT * FROM test")  # will print 51.
  </code></pre>
  
  <p>Sounds good, WireShark prints the 51 rows returned by the database. But with the computer 2...</p>
  
  <pre><code># Run this on computer 2 :
  print cursor.execute("SELECT * FROM test")  # will print 50, expected 51 because of the insert.
  </code></pre>
  
  <p>Why do I have 50 lines here ? How to avoid this issue ?</p>
  
  <p>Sorry if it's a duplicate, I probably didn't find the right keywords.</p>
  
  <p>EDIT: If I reset the connection on computer 2, I have the 51 lines.</p>