Yesterday I posted a request to remove duplicates and get the latest value. I tested the code provided by netizens in the test environment in the morning. As a result, I accidentally connected to the official environment, and the result was tragic. Now the data has been deleted by mistake. I urgently need a solution. The method,
说下数据库情况
表是 innod 引擎的,开启了binlog
In this case, you can only go to the backup and restore according to the log
It’s not easy to have a binlog. First restore today’s binlog, find the delete statement, and check the position before the statement; restore it with yesterday’s backup, and then restore it to this position by appending today’s binlog, and you will have the situation before deletion. database.
Under gg, there are many specific methods on the Internet
I have also encountered your situation, but I modified the same field of all the records in the table to be the same. Your deletion was more troublesome than mine, so I could only modify the database according to the log.