python3+jaydebeapi3访问MySQL7
import jaydebeapi
driver='com.mysql.jdbc.Driver'
jarFile=r'C:\Users\ccxpt\.PyCharm2019.2\config\jdbc-drivers\MySQL Connector\J 8\8.0.15\mysql-connector-java-8.0.15.jar'
url='jdbc:mysql://192.168.23.1:3307/oadb'
DBUser='root'
DBPwd='123456'
conn=jaydebeapi.connect(driver,[url,DBUser,DBPwd],jarFile)
curs = conn.cursor()
curs.execute('select * from glfmdrsj')
rows = curs.fetchall()
print(rows[1])
curs.close()
conn.close()