创建与数据库的连接创建与数据库的连接import mysql.connector mydb = mysql.connector.connect( host="localhost", user="myusername", passwd="mypassword") print(mydb)