Statement violates GTID consistency
报错信息:Statement violates GTID consistency: Updates to non-transactional tables,can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.
解决
使用mysql版本为5.7
,在配置文件my.cnf
中将
gtid_mode = ON
enforce_gtid_consistency = 1
修改成以下参数后,然后重启mysql,问题得到解决
gtid_mode = OFF
enforce_gtid_consistency = 0
gtid_mode 参数解析:https://blog.csdn.net/weihaodong0557/article/details/109598729