首页 » Linux » CentOS » mysq主从报错Last_SQL_Error: Error 'Duplicate entry

mysq主从报错Last_SQL_Error: Error 'Duplicate entry

 

报错信息如下:

Last_SQL_Error: Error 'Duplicate entry '2738079' for key 'PRIMARY'' on query. Default database: 'whsir'. Query: 'INSERT INTO dede_uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid)
VALUES ('小图361_170525114411_1_lit.png','/uploads/allimg/170525/361_170525114411_1_lit.png','1','640','360','0','167502','1495683851','361')'

解决办法:

修改my.cnf文件/etc/my.cnf[mysqld]下加一行slave-skip-errors=all

原文链接:mysq主从报错Last_SQL_Error: Error 'Duplicate entry,转载请注明来源!

1