配置MySQL从库,启动slave线程后”Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file”的错误❌
- step 1
先到slave中停止同步线程
1 | mysql> stop slave for channel "db136"; # mysql5.7多源复制的语法 |
- step 2
回到master中,关闭当前的二进制日志文件并创建一个新文件,新的二进制日志文件的名字在当前的二进制文件的编号上加1
1 | mysql> flush logs; |
- step 3
再从slave执行change master
1 | mysql> change master to master_host="192.168.1.136", master_port=3306, master_user="repl",master_password="12345678",master_log_file="mysql-bin.000038",master_log_pos=154 for channel "db136"; |