2

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.

4
  • you can check your data files. how much size it will be?
    – ashuthosh
    Commented Feb 21, 2013 at 5:46
  • I think it'll be near 40GB.This size is from "ibdata" file under data directory. Commented Feb 21, 2013 at 6:58
  • 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. Commented Feb 22, 2013 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. Commented Feb 22, 2013 at 17:20

1 Answer 1

2

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

1
  • 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 : dba.stackexchange.com/a/35096/877. +1 for discovering this not-so-well-known quirk. Commented Feb 22, 2013 at 17:18

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.