Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active.
#翻译:当MASTER_AUTO_POSITION处于活动状态时,无法设置参数MASTER_LOG_FILE、MASTER_LOG_POS、RELAY_LOG_FILE和RELAY_LOG_POS。
gtid-mode=on enforce-gtid-consistency=true log-slave-updates=1
让gtid关闭
change master to master_auto_position=0; #查看状态 db02 [(none)]>show variables like ‘%gtid%‘; +----------------------------------+-----------+ | Variable_name | Value | +----------------------------------+-----------+ | binlog_gtid_simple_recovery | ON | | enforce_gtid_consistency | ON | | gtid_executed_compression_period | 1000 | | gtid_mode | ON | | gtid_next | AUTOMATIC | | gtid_owned | | | gtid_purged | | | session_track_gtids | OFF | +----------------------------------+-----------+ 8 rows in set (0.00 sec)
成功告知了主库信息
db02 [(none)]>CHANGE MASTER TO -> MASTER_HOST=‘10.0.0.51‘, -> MASTER_USER=‘repl‘, -> MASTER_PASSWORD=‘123‘, -> MASTER_PORT=3306, -> MASTER_LOG_FILE=‘mysql-bin.000010‘, -> MASTER_LOG_POS=194, -> MASTER_CONNECT_RETRY=10; Query OK, 0 rows affected, 2 warnings (0.03 sec)
原文:https://www.cnblogs.com/Mercury-linux/p/12432807.html