import mysql.connector # MySql Connection mydb = mysql.connector.connect( host="localhost", user="root", password="yourpassowrd", database="databasename" )