MySQL5.6 主從復制 ERROR 1776 (HY000): Parameters MASTER_LOG_FILE
阿新 • • 發佈:2018-09-20
replica war string net ast 主從 cte clas code
主從都開啟了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
MySQL5.6 主從復制 ERROR 1776 (HY000): Parameters MASTER_LOG_FILE