在MYSQL中,執行建表語句時CREATE TABLE aaaa AS SELECT * FROM menu; 報: 錯誤代碼: 1786Statement violates GTID consistency: CREATE TABLE ... SELECT. java後臺報: Caused by: ...
在MYSQL中,執行建表語句時CREATE TABLE aaaa AS SELECT * FROM menu; 報:
錯誤代碼: 1786
Statement violates GTID consistency: CREATE TABLE ... SELECT.
java後臺報:
Caused by: java.sql.SQLException: Statement violates GTID consistency: CREATE TABLE ... SELECT.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
解決方案:
在my.cnf 中將
gtid_mode = ON
enforce_gtid_consistency = ON
改為
gtid_mode = OFF
enforce_gtid_consistency = OFF
要兩個參數一起改,然後重啟mysql