Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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)