mysql系列~複製異常

1 錯誤代碼:-1032
   錯誤信息: Slave SQL: Could not execute Delete_rows event on table zabbix.history; Can't find record in 'history', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.003228, end_log_pos 435659530, Error_code: 1032
                  [Warning] Slave: Can't find record in 'history' Error_code: 1032
   錯誤分析:delete/update 無法找到記錄
   修復手段:根據記錄分析出具體的缺失記錄手動插入即可
2 錯誤代碼:-1062
   錯誤信息: Duplicate entry ‘…’ for key 'PRIMARY
   錯誤分析:insert 重複記錄
   修復手段:根據主鍵刪除重複記錄
3 複製錯誤:-1256
   錯誤信息: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running      'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
   錯誤分析: 由於服務器異常重啓導致的錯誤,需要重新指定
   錯誤解決 stop slave; && CHANGE MASTER TO MASTER_LOG_FILE=Relay_Master_Log_File,MASTER_LOG_POS=Exec_Master_Log_Pos; && start slave;
4 複製錯誤:-1236
   錯誤信息: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index
   錯誤分析: 由於mysql主庫缺少從庫所需要的binlog導致的,需要重做從庫
   錯誤解決:從新搭建從庫
5 複製錯誤:-1236
  錯誤信息: Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master
  錯誤分析: mysql 主節點binlog被截斷,可能由多種原因,比如磁盤滿 異常重啓等
  錯誤解決: stop slave; && CHANGE MASTER TO MASTER_LOG_FILE=Relay_Master_Log_File+1,MASTER_LOG_POS=0; &&start slave;
6 複製錯誤:
  錯誤信息: Error writing file '/tmp/MYYEBa32' no space /tmp
  錯誤分析: 從庫/tmp目錄打滿
  錯誤解決: 調整mysql tmpdir=/mnt/sdc/mysql_tmp 重啓mysql服務
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章