●Slave 為 Mysql 5.1 版
●Slave log 出現
[ERROR] Error reading packet from server: Slave can not handle replication events with the checksum that master is configured to log; the first event 'mysql-bin.000004' at 120, the last event read from './mysql-bin.000004' at 120, the last byte read from './mysql-bin.000004' at 120. ( server_errno=1236)
●先到 Master 下
mysql> set global binlog_checksum='NONE';
●然後在 my.cnf 加入下面這行、才不用每次重啟都要改
binlog-checksum = none
●另外可以下指令確認
mysql> show variables like '%checksum%';
●然後下指令確認最新的binlog檔和pos
mysql> show master status\G
*************************** 1. row ***************************
File: mysql-bin.000005
Position: 120
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
●接下來到 slave 下指令
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> CHANGE MASTER TO MASTER_HOST='192.168.1.1',MASTER_USER='slave',MASTER_PASSWORD='a12345',MASTER_LOG_FILE='mysql-bin.000005', MASTER_LOG_POS=120;
Query OK, 0 rows affected (0.01 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
參考:Mysql 5.6 Master到5.1主從同步錯誤1
0 意見:
張貼留言