MySQL5.6 主从复制 ERROR 1776 (HY000): Parameters MASTER_LOG_FILE

主从都开启了gtid,在设置从库的时候遇到了问题

mysql> CHANGE MASTER TO MASTER_HOST=‘xxx’,MASTER_USER='replicant',MASTER_PASSWORD=‘xxx’, MASTER_LOG_FILE='bin.000050', MASTER_LOG_POS=191;
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.
  • 1
  • 2

解决的办法

mysql>  change master to master_auto_position=0;
Query OK, 0 rows affected (0.34 sec)

mysql>  CHANGE MASTER TO MASTER_HOST=‘xxx’,MASTER_USER='replicant',MASTER_PASSWORD=‘xxx’, MASTER_LOG_FILE='bin.000050', MASTER_LOG_POS=191;
Query OK, 0 rows affected, 2 warnings (0.51 sec)

mysql> START SLAVE;
Query OK, 0 rows affected (0.08 sec)

mysql> SHOW SLAVE STATUS \G
posted @ 2018-09-19 22:42  Oops!#  阅读(1101)  评论(0编辑  收藏  举报