PRACTICAL-1
QUES: Python connectivity with mysql
CODE:
import mysql.connector as a
mycon=a.connect(host="localhost", user="root", passwd="",database="pqr")
cursor=mycon.cursor()
cursor.execute("select*from student")
data=cursor.fetchall()
for i in data:
print(i)
OUTPUT: