Using the latest version of PyMySQL(0.9.3) I am unable to execute a query string which has multiple SQL statements in it separated by a semicolon(;)
My python version is: Python 3.6.5
import pymysql # version 0.9.3
conn = {
"host": "mysql_server_hostname",
"password": "my_password",
"port": <<port_no>>,
"user": "my_username"
}
my_query_str = 'show databases;use random_existing_db;'
with pymysql.connect(**conn):
cur.execute(query)
Error returned: (1064, 'Multiple statements detected in a single query)
Tried running the same query with PyMySQL-0.7.11 and it works