主从都开启了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
原文地址:https://www.cnblogs.com/weifeng1463/p/9678147.html
时间: 2024-09-29 10:41:40