Operating System - Linux
1753797 Members
7719 Online
108802 Solutions
New Discussion юеВ

Re: Is there a way to recover deleted mysql database ?

 
SOLVED
Go to solution
'chris'
Super Advisor

Is there a way to recover deleted mysql database ?

hi

I've deleted (drop) with phpMyAdmin a database
and I didn't do any backups before.
Is there a way to recover deleted mysql database ?

kind regards
chris
7 REPLIES 7
Jerome Henry
Honored Contributor

Re: Is there a way to recover deleted mysql database ?

Check in your /var/lib/mysql dir to see if there still is your database directory... if it's not there anymore, then no hope.
If it's here, check content... maybe phpmyadmin did just erase database name from mysql db table... no auto backup AFA I know...

bad news...
You can lean only on what resists you...
Jan Sladky
Trusted Contributor

Re: Is there a way to recover deleted mysql database ?

hi Chris,

yes, Jerome has right, /var/lib/mysql/nameofdb is the one place only where db and related informations are stored, no online redo logs or control files like at Oracle exist in mysql (so far ;-).

for case of disaster do regular backup of mysql via mysqldump which saved all db intt one file which can be very easily imported after.

see mysqldump --help

good luck, Jan
GSM, Intelligent Networks, UNIX
'chris'
Super Advisor

Re: Is there a way to recover deleted mysql database ?

thanks,

but database was lost.

"sh_ _ happens"

greetings
chris
Jan Sladky
Trusted Contributor

Re: Is there a way to recover deleted mysql database ?

Chris,
if you have ext2 filesystem, there is still small chance you can undellete db file, but how time is running chance is smaller and smaller ...

try to find some like undelete ext2, I guess that even Midnight Commander has this feature

good luck

Jan
GSM, Intelligent Networks, UNIX
'chris'
Super Advisor

Re: Is there a way to recover deleted mysql database ?

thanks, but it was ext3
Jan Sladky
Trusted Contributor
Solution

Re: Is there a way to recover deleted mysql database ?

it sounds bad ...

how did you, or anyone else, get data into mysql ? wasn't used some text file for loading, something like csv ? try to find it

has anyone else made some backup of /var/lib/mysql ?

try to find on entire disk all files with
following sufixes :

trigger.MYD
trigger.MYI
trigger.frm

find / -name '*.MYD'

(It can be in some Trash if were deleted in XManager enviroment)

Jan
GSM, Intelligent Networks, UNIX
'chris'
Super Advisor

Re: Is there a way to recover deleted mysql database ?

it was deleted with phpMyAdmin (drop database)