There is no database on the world which had its data in .sql
files. They use their highly optimized binary format. It is in most cases in /var/lib/mysql
, but it depends a lot from your actual distribution and even from your server environment.
You can easily find out, where are the actual database by asking their list with an lsof -p <pid>
command of your database process. Its pid you can find out by a top
or by a ps uxa
command.
But it won't help in your case. You need to recover your database:
- Start your db in rescue mode,
- Dump everything out with a
mysqldump -A
- Stop the db,
- Delete (or save for later deeper analyze/recover) your broken database files,
- Reinit your db, and import everything back.
After that, your db will work, but probably a part of your data will be lost. It is a 'funny' thing to merge the actual, but recovered and partially broken data with your backup :-) Good luck :-)