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

前端 未结 3 2130
无人共我
无人共我 2020-12-22 01:54

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

I recently needed to remove a table from MySQL, and now need to create a new one in its place. I a

相关标签:
3条回答
  • 2020-12-22 02:23

    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>
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-22 02:42

    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.

    0 讨论(0)
提交回复
热议问题