Can't create a table in MySQL because “it already exists”

余生长醉 提交于 2019-11-29 16:29:18

As the table exists then just remove it with drop table (http://dev.mysql.com/doc/refman/5.6/en/drop-table.html)

i.e.

drop table <table name>

You must have done something wrong as the table still exists.

Can check this with select

i.e.

select * from <table name>

It looks your innodb tablespace has been corrupted.

Checkout this post from percona

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

And these tools

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

They will save you!

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

Go to where your mysql folder is installed: C:\Apps\mysql-5.6.25-win64\data\databasename

Under databasename you will find your tablename. Delete this table manually and create it again using SQL Create Table command.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!