我遇到了与我的previous question相关的MySQL问题。
我最近需要从MySQL中删除一个表,现在需要在它的位置创建一个新表。我正在努力解决这个问题,因为正如MySQL Workbench所说,“该表已经存在。”由于MySQL Workbench的错误不是特别有用,所以我从错误日志中提取了一些内容。有什么问题?
我在Windows 8.1 Pro x64上运行MySQL 5.7。
2014-03-06T01:38:55.459658Z 0 [ERROR] InnoDB: Table thepwf_prgminteractions/p2p_messagedata in the InnoDB data dictionary has tablespace id 25, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html
InnoDB: for how to resolve the issue.
2014-03-06T01:38:55.464671Z 0 [ERROR] InnoDB: Table thepwf_prgminteractions/p2p_onlineusers in the InnoDB data dictionary has tablespace id 26, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html
InnoDB: for how to resolve the issue.
2014-03-06T01:38:55.468672Z 0 [ERROR] InnoDB: Table thepwf_prgminteractions/p2pchat_betaaccesskeys in the InnoDB data dictionary has tablespace id 24, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary.
答案 0 :(得分:1)
由于表存在,只需使用drop table(http://dev.mysql.com/doc/refman/5.6/en/drop-table.html)
删除它即。
drop table <table name>
由于桌子仍然存在,你一定做错了。
可以使用select
即
select * from <table name>
答案 1 :(得分:1)
看起来你的innodb表空间已经损坏了。
从percona查看此帖子
http://www.mysqlperformanceblog.com/2008/07/04/recovering-innodb-table-corruption/
这些工具
http://www.percona.com/software/percona-toolkit
他们会救你!
我不知道他们在Windows上运行的程度如何,但这些工具应该是一样的。
答案 2 :(得分:0)
转到安装mysql文件夹的位置: C:\ APPS \ MySQL的-25年6月5日 - Win64的\数据\数据库名称
在databasename下,您将找到您的表名。手动删除此表并使用SQL Create Table命令再次创建它。