title: How to execute simple command using mysql.connector (Python)
body: <p>I installed the MySQL connector from Oracle, and entered the following commands in Python (currently running Python 2.7.6)</p>
  
  <pre><code>import mysql.connector
  
  cnx=mysql.connector.connect(user='genome',host='genome-mysql.cse.ucsc.edu',database='hg19')
  cursor=cnx.cursor()
  query=('show tables')
  cursor.execute(query)
  </code></pre>
  
  <p>Nothing happened!  I expected to see a list of tables.  Why?
  Incidentally, I tried this as well, with the same result:</p>
  
  <pre><code>query=('SELECT * FROM wgRna')
  cursor.execute(query)
  </code></pre>
  
  <p>I know I have MySQL properly installed on my computer, because when I enter the same commands into the terminal everything is fine. Can someone explain to me what I'm doing wrong in Python?</p>