昨天同事在做主從時,從庫報如下錯誤:
Got fatal error 1236 from master when reading data from binary log: 'Misconfigured master - server id was not set'
備庫采集: root@localhost Fri May 23 14:18:59 2014 14:18:59 [(none)]> show variables like '%server_id%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | server_id | 2 | +---------------+-------+ 主庫采集: mysql> show variables like '%server%'; +----------------------+-------------------+ | Variable_name | Value | +----------------------+-------------------+ | character_set_server | latin1 | | collation_server | latin1_swedish_ci | | server_id | 1 | +----------------------+-------------------+
由於業務是用於存儲hadoop的元數據,之前MySQL版本較低,同事用了比master版本高的slave,本以為是這個原因,但在MySQL 的bug列表上發現:
該發現否定了我們之前的判斷,經過同事那邊的測試,也確實是這個bug :-)