-2

I deleted records in a MySQL table two days ago. Can you please help me to get back these records. I don't know how to repair the MySDL table.

Please help me to get back the deleted data and mention some way to create a backup for my MySQL database.

zessx
  • 68,042
  • 28
  • 135
  • 158
ratanji
  • 1
  • 1
  • you can't restore deleted data unless you have backup – Monnster Jul 04 '14 at 13:08
  • 4
    This question appears to be off-topic because it appears to lack a basic level of research. – Strawberry Jul 04 '14 at 13:08
  • You should have done a backup **before** you deleted the data. Now it's too late. – dnoeth Jul 04 '14 at 13:13
  • You can check the binary logs (if you have them) to see if you still have the insert transactions that were deleted - see this question for background http://stackoverflow.com/questions/3394132/mysql-transaction-log. For a backup solution, try googling for "automysqlbackup". – Lord Peter Jul 04 '14 at 13:22

1 Answers1

4

There's no "magical" way to restore deleted data, so :

enter image description here

To create a backup, you simply have to export the whole database in a file. This can be done easily with any database manager. Here is how to do it with PHPMyAdmin :

  • Click on your database (left pane)
  • Click on Export (top of the page)
  • Click on Go for a quick and full export
  • Keep the generated file in a safe place (ie. not in your website folder)
zessx
  • 68,042
  • 28
  • 135
  • 158