Mysqli statement execute error Statement violates GTID consistency CREATE TABLE ...

解决:

在my.cnf 中将

1
2
gtid_mode = ON
enforce_gtid_consistency = ON

改为

1
2
gtid_mode = OFF
enforce_gtid_consistency = OFF

要两个参数一起改,然后重启mysql,问题解决