import MySQLdb conn = MySQLdb.connect( host='gvsds.com', port=50030, user='root', password='sajksh.sdfGH3YUge.wjkd+', database='xaio_cheng_xu', charset='utf8mb4' ) cur = conn.cursor() cur.execute("SHOW TABLES") for row in cur.fetchall(): print(row[0]) cur.close() conn.close()