学习 mysql 主从,因为先进行过 binlog 二进制日志方式的复制,然后改用 GTID 方式,折腾过程中,导入数据报错
$ mysql -uroot -pPassword@123 < dbdump101-20230414.db
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1776 (HY000) at line 24: Parameters SOURCE_LOG_FILE, SOURCE_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when SOURCE_AUTO_POSITION is active.
解决方案
mysql> stop replica;
mysql> change master to master_auto_position=0;
再次导入就 OK!