Search
  • dbrecover

DBRECOVER for MySQL RECOVER CASE : DELETE SQL STATEMENT


mysql> use  employees;
Database changed

mysql> show create table employees;
 
| employees | CREATE TABLE `employees` (
  `emp_no` int(11) NOT NULL,
  `birth_date` date NOT NULL,
  `first_name` varchar(14) NOT NULL,
  `last_name` varchar(16) NOT NULL,
  `gender` enum('M','F') NOT NULL,
  `hire_date` date NOT NULL,
  PRIMARY KEY (`emp_no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
 



mysql> select count(*) from employees;
+----------+
| count(*) |
+----------+
|     1000 |
+----------+
1 row in set (0.00 sec)


mysql> delete from employees;


mysql> flush table employees with read lock;
Query OK, 0 rows affected (0.01 sec)



we can directly scan the table .ibd file ,and find the deleted records:

  • select add .ibd from menu start

  • input the deleted table's ibd location

  • right click the ibd file , scan it

  • click the first page node , and input create table sql

  • choose the right mysql version , and page format (dynamic in most version)

  • select the Deleted Data Tab , then you can check deleted records and export them into MYSQLDUMP format SQL file.

You can also use conventional recovery mode in this case.











12 views0 comments

Recent Posts

See All

DBRECOVER for MySQL Video Guide

dbrecover for mysql recover case drop database https://youtu.be/ao7OY8IbZQE dbrecover for mysql recover case crash instance https://youtu.be/DAyWq7-CR5s dbrecover for mysq