Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover just deleted rows in mysql?

Tags:

database

mysql

Is it possible to restore table to last time with data if all data was deleted accidentally.

like image 500
kinkajou Avatar asked Aug 03 '11 10:08

kinkajou


People also ask

Can we recover deleted row in MySQL?

No this is not possible. The only solution will be to have regular backups.

How do I restore a record in MySQL?

A SELECT statement begins with the SELECT keyword and is used to retrieve information from MySQL database tables. You must specify the table name to fetch data from—using the FROM keyword—and one or more columns that you want to retrieve from that table. A keyword is a word that is part of the SQL language.


1 Answers

There is another solution, if you have binary logs active on your server you can use mysqlbinlog

generate a sql file with it

mysqlbinlog binary_log_file > query_log.sql 

then search for your missing rows. If you don't have it active, no other solution. Make backups next time.

like image 109
Mihai Iorga Avatar answered Oct 05 '22 12:10

Mihai Iorga