最新消息:

mysql Error_code: 1062 错误修复

mysql admin 4529浏览 0评论

mysql 1062 错误

是由于主从更新到从库时, 从库已经有相应记录

root@1.1.1.1 10220: (none) 11:16:44 :> show slave status\G;
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
               Last_SQL_Error: Last_SQL_Error: Could not execute Write_rows event on table auto.log; Duplicate entry '161' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-binlog.0001, end_log_pos 22222

删除从库 161 启动 salve

root@1.1.1.1 10220: (none) 11:18:22 :> delete from auto.log where id = 161;
root@1.1.1.1 10220: (none) 11:18:26 :> start slave sql_thread;

转载请注明:爱开源 » mysql Error_code: 1062 错误修复

您必须 登录 才能发表评论!