数据库
首页 > 数据库> > 无法在MySQL中创建表,因为“它已经存在”

无法在MySQL中创建表,因为“它已经存在”

作者:互联网

我遇到了MySQL的问题,与我的previous question有关.

我最近需要从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.

解决方法:

由于表存在,只需使用drop table删除它(http://dev.mysql.com/doc/refman/5.6/en/drop-table.html)

drop table <table name>

由于表仍然存在,您必须做错了.

可以选择选中此项

select * from <table name>

标签:mysql,windows-8-1
来源: https://codeday.me/bug/20191002/1844393.html