Python InternalError:(pymysql.err.InternalError)(1193,“未知系统变量&”x27;“事务隔离&”
尝试使用PyMySQL版本0.8.0从Python(版本3.6.5)将数据帧输出到MySQL数据库表中。SQLAlchemy版本1.2.17,数据库服务器为8.0.1 到目前为止,相同的代码一直运行良好。如有任何关于如何解决的建议,我们将不胜感激Python InternalError:(pymysql.err.InternalError)(1193,“未知系统变量&”x27;“事务隔离&”,python,mysql,sqlalchemy,pymsql,Python,Mysql,Sqlalchemy,Pymsql,尝试使用PyMySQL版本0.8.0从Python(版本3.6.5)将数据帧输出到MySQL数据库表中。SQLAlchemy版本1.2.17,数据库服务器为8.0.1 到目前为止,相同的代码一直运行良好。如有任何关于如何解决的建议,我们将不胜感激 pymysql.install_as_MySQLdb() conn = pymysql.connect(host='xx.xx.xx.xx', user= 'user', password= 'xxxxx', db='db', char
pymysql.install_as_MySQLdb()
conn = pymysql.connect(host='xx.xx.xx.xx', user= 'user',
password= 'xxxxx', db='db', charset='utf8mb4',
cursorclass=pymysql.cursors.SSCursor)
c = conn.cursor()
engine = create_engine('mysql://user:xxxx.xx.xx.xx/db')
database.to_sql('fact_data', con=engine)
database
错误:InternalError:(pymysql.err.InternalError)(1193,“未知系统变量‘transaction_isolation’”)设法找到支持较新SQL版本的包版本组合: pymysql-0.9.3
SQLAlchemy-1.3.4设法找到支持较新SQL版本的包版本组合: pymysql-0.9.3
SQLAlchemy-1.3.4不确定是否相关,但在8.0.3版中删除了不推荐使用的变量名
tx\u isolation
。如果版本>=5.7.20,则SQLAlchemy mysql方言似乎使用了新名称。不确定是否相关,但在版本8.0.3中删除了不推荐使用的变量名tx\u isolation
。如果版本>=5.7.20,SQLAlchemy mysql方言似乎使用了新名称。