mysql报错总结

错误 解决
ERROR 1776 (HY000): Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE 
and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active.
开启GTID后,5.6后,不需要手工确定主服务器的MASTER_LOG_FILE及MASTER_LOG_POS
mysql> change master to master_host='127.0.0.1',master_user='rep',master_password='rep',master_port=3306,master_auto_position=1;
 
ERROR 1858 (HY000): sql_slave_skip_counter can not be set when the server is running 
with @@GLOBAL.GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an
empty transaction with the same GTID as the transaction

 https://www.cnblogs.com/zhoujinyi/p/4717951.html

解决方式,跳过一步:

show slave statusG;找到主库binglog位置

mysqlbinlog  主库binlog.00008

stop slave;
set session gtid_next='25345802-2392-11e9-8174-fa163ec31a82:18'; #在session里设置gtid_next,即跳过这个GTID
begin; #开启一个事务
commit;
SET SESSION GTID_NEXT = AUTOMATIC; #把gtid_next设置回来
start slave; #开启复制

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
原文地址:https://www.cnblogs.com/kevincaptain/p/10342180.html