import pymysql.cursors
conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='pass', db='test')
try:
with conn.cursor() as cursor:
sql = 'select * from vkbot'
a = cursor.execute(sql)
print(a)
finally:
conn.close()
0