Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’ve used MySQL on windows7.

Recently my machine was infected by a virus.

After that SHOW TABLES and SHOW DATABASES statements don’t show any tables and databases but I can see data from tables which I’ve created with SELECT statement.

In addition mysqldump doesn’t work. It makes dump file but there is no data.

mysqldump can’t resolve database and table names.

I think SHOW statements and mysqldump use information_schema table.

Then my question is how does MySQL resolve schema information when it create information_schema table?

There must be some resource that information_schema refer to.

I believe the resource was destroyed by the virus,and I want to fix it.

share|improve this question
you can check your data files. how much size it will be? – ashuthosh Feb 21 '13 at 5:46
I think it'll be near 40GB.This size is from "ibdata" file under data directory. – user1345414 Feb 21 '13 at 6:58
Have you verified that the database files exist in the data directory? – jersten Feb 22 '13 at 4:29
Yes, I did. There are folders with same name of database I created and there are *.frm files with same name of tables in each folder. – user1345414 Feb 22 '13 at 4:43
I will also +1 the question since MySQL users in Windows must be made aware of the information_schema's sensitivity to the Windows environment. – RolandoMySQLDBA Feb 22 '13 at 17:20
up vote 2 down vote accepted

I found a cause. All folders under the data directory were hidden attribute. I changed them then I can see tables and dump data.

share|improve this answer
This answer is actually brilliant. I was thinking the same for MySQL in Windows as I suggested how to disable databases using attrib just 2 days ago : +1 for discovering this not-so-well-known quirk. – RolandoMySQLDBA Feb 22 '13 at 17:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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