I uninstalled WAMP
on Win7
. It removed everything but kept the data folder containing my database. After installing WAMP again on same directory, I thought it will recover MySQL
database but it didn't.
It does show me my database and when I expand it in phpMyAdmin
, I can see the tables but when I try to query them, it says, #1146 - Table 'tablename' doesn't exist
I searched and found a couple of posts. This post is close enough but it is for Linux and not exactly my case.
Any help will be appreciated.
UPDATE 1: I tried repeating the steps mentioned here
- Stopped MySQL service,
- Renamed old database directory,
- Started MySQL service,
- Created new database with same name, and replaced all database files on it
Still got the same error.
UPDATE 2: I tried repeating the steps mentioned here as well Still getting the same error.
UPDATE 3: Examining .err file revealed the below error:
[Warning] InnoDB: Cannot open table testdb/rules from the internal data dictionary of InnoDB though the .frm file for the table exists.
UPDATE 4:
CHECK TABLE
tablename;
resulted in following errors
Warning InnoDB: Tablespace is missing for table 'db/tablename'
Error Table 'db.tablename' doesn't exist
status Operation failed