📅  最后修改于: 2022-03-11 15:04:52.344000             🧑  作者: Mango
#To resolve this error just add auth_plugin
import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="username",
password="password",
database="db name",
auth_plugin='mysql_native_password'
)