随笔都是学习笔记
随笔仅供参考,为避免笔记中可能出现的错误误导他人,请勿转载。
# 连接数据库
con = pymysql.connect(host="localhost", port=3306, user="xxx", password="xxxxxx", database="xxx", charset="utf8")
cur = con.cursor()
cur.execute("show tables;")
res = cur.fetchall()
for table in res:
    print(table)

 

posted on 2023-12-10 22:07  时间完全不够用啊  阅读(4)  评论(0编辑  收藏  举报