What can be done to prevent SQL injection
# connect to database via ssh-tunnel and run query
cnx = mysql.connector.connect(user='p11179711', password='VRandhawa51',
host='127.0.0.1', port=server.local_bind_port,
database='db247_10000003')
cursor = cnx.cursor()
cursor.execute(query)
permissions = cursor.fetchall()
# connect to database via ssh-tunnel and run query
cnx = mysql.connector.connect(user='p11179711', password='VRandhawa51',
host='127.0.0.1', port=server.local_bind_port,
database='db247_10000003')
cursor = cnx.cursor()
cursor.execute(query)
permissions = cursor.fetchall()