While doing restore from a MySQL binary log file, it is failing with the following error .
mysqlbinlog mysql-bin.000036 | mysql -u root -p asdb ERROR 1032 (HY000) at line 48: Can't find record in 'dlfilerank'
The error is after a full database backup using
dlfilerank in question is used by liferay CMS which seems to keep inconsistent data. The table is used to keep track of recently downloaded files, which is displayed in the Recent Downloads portlet.
I thought one way to resolve this issue is to delete all records from this table before restoring from binary log file . But this lead to restore failing with a different error.
mysqlbinlog mysql-bin.000036 | mysql -u root -p asdb ERROR 1062 (23000) at line 387: Duplicate entry '768524' for key 'PRIMARY'
Next I am thinking to delete this table from both mysqldump and binary log file . It will be easy to delete the table after restoring to mysql database , but not sure how to delete db transactions for this table from binary log . Any suggestions how I can I do this . Also , will this approach will resolve the problem mentioned in original description .