MySQL表消失了

时间:2014-03-06 21:22:43

标签: mysql windows-8.1 mysql-5.7

我遇到了MySQL问题。我最近需要重建我的计算机,因为我得到了病毒。重建的一切进展顺利,但我很难让MySQL表现自己。我的数据库的配置文件与之前的配置文件完全相同,但是在重新启动MySQL后,我遇到某些表消失的问题。

以下是错误日志中的一段我相信详细说明此问题:

2014-03-06T21:02:13.043598Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld: ready for connections.
Version: '5.7.3-m13-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
2014-03-06T21:02:33.191623Z 5 [ERROR] InnoDB: Failed to find tablespace for table "testschema_testwithunderscore"."testtable_withunderscore" in the cache. Attempting to load the tablespace with space id 57.
2014-03-06 16:02:33 0x1d64  InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.
2014-03-06T21:02:33.194622Z 5 [ERROR] InnoDB: Could not find a valid tablespace file for 'testschema_testwithunderscore/testtable_withunderscore'. See http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:33 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:34 0x1d64 InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
2014-03-06 16:02:39 0x1d9c InnoDB: cannot calculate statistics for table "testschema_testwithunderscore"."testtable_withunderscore" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html

我曾经发过一次这个问题,但似乎没有人完全理解我的问题。为了更容易理解该问题,请观看this video,向我展示创建测试模式和测试表,重新启动数据库,并观察它消失。我打开的文件夹是MySQL服务器的ProgramData文件夹。 作为旁注,当我将lower_case_table_names设置为1时,不会发生消失表格的这种奇怪行为。我希望能够在我的表名中使用大写字符,就像我过去一样。

1 个答案:

答案 0 :(得分:1)

问题现在已经解决了一段时间,但直到今天我才忘记这个问题所以我会回来回答它。显然我的MySQL服务器安装在某种程度上已经损坏,重新安装服务器解决了这个问题。