Error number: 1885; Symbol: ER_SLAVE_HAS_MORE_GTIDS_THAN_MASTER; SQLSTATE: HY000
Message: Slave has more GTIDs than the master has, using the master’s SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replicated to the slave. Suggest to replicate any transactions that master has rolled back from slave to master, and/or commit empty transactions on master to account for transactions that have been committed on master but are not included in GTID_EXECUTED.
错误说明:
ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE错误表明,从源(master)复制数据到复制( slave)时,GTID集合在复制上比源更大。这意味着从源复制到复制时,复制机器上发生了不正确的GTID事务变更。
ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE错误可能在开启GTID时触发,由于复制服务器检测到GTID设置不正确,因此产生了错误。
解决方法:
解决此问题的最佳解决方案是重新设置主服务器的GTID。要禁用GTID,请执行以下操作:
1. 停止应用程序和数据库服务器;
2. 在配置文件中 de-activate GTID 选项,
3. 启动MySQL 服务;
4. 重启应用程序。