I have a serious problem in my MySQL tables , once there were InnoDB tables which were IN USE and now are somehow hidden
look at this [pic] *Link removed - the number of tables in heading is 79 and actual counted number is 74.
these tables are those that were IN USE
I don't have any recent backup of my database , so this would game of life and death for me
I checked my VPS, I found them at /etc/lib/mysql/db_name/.
EDIT :
I Searched around internet and I found out that every table should have 3 files related to it.
For example, the table table_users
has:
-- table_users.frm
-- table_users.MYD
-- table_users.MYI
and for those hidden table , there are only .frm files and the other two files of a table are missing.
I should change my question to: How to recover a innodb table from a .frm file?
You can view a list of InnoDB INFORMATION_SCHEMA tables by issuing a SHOW TABLES statement on the INFORMATION_SCHEMA database: mysql> SHOW TABLES FROM INFORMATION_SCHEMA LIKE 'INNODB%'; For table definitions, see Section 26.4, “INFORMATION_SCHEMA InnoDB Tables”.
To determine whether your server supports InnoDB : Issue the SHOW ENGINES statement to view the available MySQL storage engines. mysql> SHOW ENGINES; Alternatively, query the INFORMATION_SCHEMA.
InnoDB does not have those three files
InnoDB data is stored in "ibdata1" for all databases and tables. the table definition is stored in "tablename.frm"
I would say that your InnoDB file has become corrupted, you may want to have a look at these tools: https://launchpad.net/percona-innodb-recovery-tool
UPDATED
First of all, about the files:
To recover tables, you can try (make backup first):
1) run check table tablename
- for all db tables;
2) run repair table tablename
- for necessary tables.
UPDATED ONCE AGAIN
Another idea... Try this:
I expect correct tables (without data, of course). And sorry, for now I have no PC to check, before suggesting...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With