import pymysql

# 连接数据库

conn = pymysql.connect(host='localhost',user='root',password='password',database='pymysql',port=3306)
cursor = conn.cursor()
cursor.execute('select 2')
result = cursor.fetchone()

print(result)
# 关闭连接
conn.close()

21e9b0f6fe89586efdf6eb2150eae64b77605cd4
<mask token>

<mask token>
cursor.execute('select 2')
<mask token>
print(result)
conn.close()

<mask token>
conn = pymysql.connect(host='localhost', user='root', password='password',
    database='pymysql', port=3306)
cursor = conn.cursor()
cursor.execute('select 2')
result = cursor.fetchone()
print(result)
conn.close()

import pymysql
conn = pymysql.connect(host='localhost', user='root', password='password',
    database='pymysql', port=3306)
cursor = conn.cursor()
cursor.execute('select 2')
result = cursor.fetchone()
print(result)
conn.close()

import pymysql

# 连接数据库

conn = pymysql.connect(host='localhost',user='root',password='password',database='pymysql',port=3306)
cursor = conn.cursor()
cursor.execute('select 2')
result = cursor.fetchone()

print(result)
# 关闭连接
conn.close()
