主库开启gtid后从库如何重新同步
环境:
mysql5.6
1.主库开启gtid
gtid_mode=ON
enforce_gtid_consistency=ON
log_slave_updates=1
2.发现从库报错误
Last_IO_Error: The slave IO thread stops because the master has @@GLOBAL.GTID_MODE ON and this server has @@GLOBAL.GTID_MODE OFF
3.从库也开启gtid
log-bin=mysql-bin
binlog_format=row
gtid_mode=ON
enforce_gtid_consistency
log-bin=/home/mysql/binlog/binlog.bin
4.重启从库,启动同步进程
-- The End --