<filename>thirdparty/dababase/pymysql/pymysql_select.py
import pymysql

conn = pymysql.connect(
    host="192.168.2.110",
    user='root',
    password='<PASSWORD>',
    database='mysql_db',
    charset='utf8'
)

cursor_test = conn.cursor()

sql = '''select * from user'''

try:
    cursor_test.execute(sql)
    result = cursor_test.fetchall()
    for row in result:
        print("username %s, age %s" % (row[0], row[1]))
    conn.commit()
except:
    conn.rollback()

conn.close()

<filename>thirdparty/dababase/pymysql/pymysql_select.py
import pymysql

conn = pymysql.connect(
    host="192.168.2.110",
    user='root',
    password='<PASSWORD>',
    database='mysql_db',
    charset='utf8'
)

cursor_test = conn.cursor()

sql = '''select * from user'''

try:
    cursor_test.execute(sql)
    result = cursor_test.fetchall()
    for row in result:
        print("username %s, age %s" % (row[0], row[1]))
    conn.commit()
except:
    conn.rollback()

conn.close()

select * from user