SHOW TABLES.py

import mysql.connector as mq
md=mq.connect(host="localhost",user="root",passwd="hacker",charset="utf8",database="world")
if md.is_connected():
    print("connection established")
mcur=md.cursor()
mcur.execute("show tables")
for i in mcur:
    print(i)

md.close()

Comments

Popular Posts