MySQL error 1062 - Duplicate entry when starting slave or replication fail?
Tuesday, September 16, 2014
Duplicate entry when starting slave? MySQL error 1062
Why does replication fail with error Duplicate entry for key?
following error when executing the mysql> start slave;:
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry '115846' for key
'PRIMARY'' on query. Default database: 'db'. Query: 'INSERT INTO
request_posted (id, user_id, channel, message, link, picture, name, ...
Solution :-
Try to skip some queries with:
mysql> STOP SLAVE;
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
mysql> START SLAVE;
following error when executing the mysql> start slave;:
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry '115846' for key
'PRIMARY'' on query. Default database: 'db'. Query: 'INSERT INTO
request_posted (id, user_id, channel, message, link, picture, name, ...
Try to skip some queries with:
mysql> STOP SLAVE;
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
mysql> START SLAVE;
0 comments:
Post a Comment