Re: 'Duplicated entry for PRIMARY key'
Posted by:
J P
Date: September 12, 2014 02:24AM
Both show create tables are identical on master and slave.
Master:
ENGINE=InnoDB
AUTO_INCREMENT=4786
Slave:
ENGINE=InnoDB
AUTO_INCREMENT=4786
show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: *******
Master_User: *******
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000008
Read_Master_Log_Pos: 46973761
Relay_Log_File: mysqld-relay-bin.000016
Relay_Log_Pos: 1639593
Relay_Master_Log_File: mysql-bin.000008
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: *******
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '4765' for key 'PRIMARY'' on query. Default database: 'database'. Query: 'insert into table (column1, column2, column3, column4, column5) values (78, 11, 46, '2014-09-08', 21)'
Skip_Counter: 0
Exec_Master_Log_Pos: 1639448
Relay_Log_Space: 46974105
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry '4765' for key 'PRIMARY'' on query. Default database: 'database'. Query: 'insert into table (column1, column2, column3, column4, column5) values (78, 11, 46, '2014-09-08', 21)'
Master:
server-id=87
Slave:
server-id=536