python3.12-PyMySQL/tests/smoke_test.py
Lukas Zachar be493ddc2e Add tmt gating plan
Cherry-picked from python3.11-PyMySQL db207444c9844fcb22b827c887faee56fcb01bc7
db207444c9
2024-01-16 15:34:27 +01:00

13 lines
328 B
Python

#!/usr/bin/python3
# Modified from
# https://github.com/PyMySQL/PyMySQL/blob/v1.0.2/example.py
import pymysql
connection = pymysql.connect(unix_socket="/var/lib/mysql/mysql.sock", db="mysql")
cursor = connection.cursor()
cursor.execute("SELECT Host,User FROM user")
print(cursor.description)
cursor.close()
connection.close()