title: (0, ''): InterfaceError in pymysql
body: <p>I'm trying to read from a certain row in an MySQL data base. I'm getting an InterfaceError on line 17. </p>
  
  <p><strong>The full error:</strong></p>
  
  <p><em>(0, ''): InterfaceError
  Traceback (most recent call last):
    File "/var/task/handler.py", line 17, in main
      cur.execute(sql)</em></p>
  
  <p>I tested the MySQL query by it self and it works just fine. The program is using the Serverless Framework hosted on Amazon Lambda.</p>
  
  <pre><code>   import json
  import common
  import pymysql
  
  db = pymysql.connect(host="example.com",
                       user="admin",
                       passwd="Foo",
                       db="Bar")
  
  def main(event, context):
      sql = "SELECT * FROM Accounts WHERE Username ='Caleb'"
      cur = db.cursor()
      cur.execute(sql)
      result = cur.fetchall()
      cur.close()
      db.close()
      data = pwd + usern
      alldata = data + result
      return dict(
          statusCode=200,
          body=json.dumps(alldata)
     )
  
      return response
  </code></pre>