0

enter image description here

Accidently deleted mysql database and reload again.But ı cant find my old database and no have backup.This is picture that mysql ProgramData folder. Which folder should ı use for recovery? Thanks advice

2
  • Server creates separate folder for each separate database, with the same name. You have dropped database - so both database files and database folder were deleted. Try to recover this deleted folder then try to recover deleted files in it.
    – Akina
    Mar 12, 2021 at 10:33
  • Thanks your answer.As I search databases create backup by itself and maybe it can be related about innodb. Just wonder that how to do it
    – Kayhan
    Mar 13, 2021 at 6:01

1 Answer 1

0

Accidently deleted mysql database ...

It happens.
It shouldn't be the End of the World.

... and reload again. But I cant find my old database ...

Not sure what you mean by "reload" but if you did anything that involved running "create database" for that particular database then anything and everything about the old database has now been obliterated.

... and no have backup.

This is hard lesson for any DBA to learn and, sadly, you've learned it the Hard Way:

Any Data that you don't have at least two copies of is Data that you do not care about and are perfectly content to lose.

You must take Backups of your databases, for the very reason that, sometimes, when things go badly wrong, you have to Recover them.

If you have backups of the machine itself, you might be able to get something back by restoring the data files from that but do not expect to get everything back. Databases do a lot in memory, so any files copied out from "under" a running database instance are not consistent.

1
  • yeah you are right it should not be end of the world. I know that data is imported but while everything is gonna okey , ı could not reach my local db that one of the my mistake ı write one query statement. It can happen to any person anyway as ı search it can be some solution about that folder. Just would want to ask. Thanks your answer
    – Kayhan
    Mar 13, 2021 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.