无法在MySQL中创建表,因为“表已存在" [英] Can't create a table in MySQL because "it already exists"

查看:123
本文介绍了无法在MySQL中创建表,因为“表已存在"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用MySQL时遇到问题,与我的

I am having an issue with MySQL, relating to my previous question.

我最近需要从MySQL中删除一个表,现在需要在其位置创建一个新表.我对此很难,因为正如MySQL Workbench所说,该表已经存在".由于来自MySQL Workbench的错误并不是特别有用,因此,我从错误日志中提取了一些内容.有什么问题吗?

I recently needed to remove a table from MySQL, and now need to create a new one in its place. I am having a hard time with this because, as MySQL Workbench says, "The table already exists." Since the error from MySQL Workbench is not particularly helpful, here's some stuff that I pulled out of my error log. What's the problem?

我正在Windows 8.1 Pro x64上运行MySQL 5.7.

I am running MySQL 5.7 on Windows 8.1 Pro x64.

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.

推荐答案

看来您的innodb表空间已损坏.

It looks your innodb tablespace has been corrupted.

从percona检出此帖子

Checkout this post from percona

http://www.mysqlperformanceblog.com/2008 /07/04/recovering-innodb-table-corruption/

这些工具

http://www.percona.com/software/percona-toolkit

他们会救你的!

我不知道它们在Windows上的运行情况如何,但是工具的作用应该差不多.

Well I don't know how well they run on windows but what the tools do should be about the same.

这篇关于无法在MySQL中创建表,因为“表已存在"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆