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服务