【Python】从入门到上头—mysql数据库操作模块mysql-connector和PyMySQL应用场景 (15)
mysql-connectorMySQL官方提供了mysql-connector-python驱动安装驱动python-mpipinstallmysql-connector连接数据库获取连接importmysql.connectordb=mysql.connector.connect(host="localhost",#ipuser="root",#用户名passwd="root",#密码data