Connect to MYSQL and create a database | Python

July 28th, 2021 01:05:05 PM

					
import mysql.connector mydb = mysql.connector.connect( host="localhost", user="yourusername", password="yourpassword" ) mycursor = mydb.cursor() mycursor.execute("CREATE DATABASE mydatabase")

Featured Posts