CREATE DATABASES.py

import mysql.connector as mq
md=mq.Connect(host="localhost",user="root",passwd="root",database="world")
mcur=md.cursor()
mcur.execute("create database jhonny")
md.commit()
mcur.execute("show databases")
for i in mcur:
    print(i)

md.close()

Comments

Popular Posts