pip install pymysql
import pymysql.cursors
// 连接gbase数据库
connection = pymysql.connect(host='127.0.01', port=5258, user='root',
password='111', db='habo', charset='utf8mb4')
cur = connection.cursor();
cur.execute("SELECT * FROM dim_vip limit 10")
for r in cur.fetchall():
print(r);
connection.close()