title: mysql.connector multiple queries: Error -1: No result set to fetch from
body: <p>In Python 2.7.3, Wins 10, MySQL remote server 5.6.23, MySQL.connector 2.1.3,</p>
  
  <p>If I wanna run these two queries together in Python MySQL.connector:</p>
  
  <pre><code>SELECT * FROM A LIMIT 5;
  
  
  SELECT DISTINCT COLUM_A FROM B;
  </code></pre>
  
  <p>I got the following error message using the code below:</p>
  
  <pre><code>Error -1: No result set to fetch from.
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>import mysql.connector as MySQL
  
  cursor = conn.cursor ()
  
  sql1 = "SELECT * FROM A LIMIT 5;SELECT DISTINCT COLUM_A FROM B"
  
  cursor.execute(sql1,multi=True)
  
  row = cursor.fetchall ()
  
  warning = cursor.fetchwarnings()
  
  print row
  
  print warning
  
  cursor.close ()
  
  conn.close ()
  </code></pre>
  
  <p>Here is the MySQL cursor.execute() official document, which completely confuses me.  Could any guru enlighten?  Thanks!</p>
  
  <p><a href="https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html" rel="nofollow">https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html</a></p>