《MYSQL創建表出錯Tablespace for table XXX exists. Please DISCARD the tablespace before IMP》要點:
本文介紹了MYSQL創建表出錯Tablespace for table XXX exists. Please DISCARD the tablespace before IMP,希望對您有用。如果有疑問,可以聯系我們。
相關主題:MYSQL命令
剛才用MYSQL的CREATE TABLE命令創建表xxxxx,出現:
Tablespace for table xxxxx exists. Please DISCARD the tablespace before IMP
過程:
因為這個表是出現異常,在客戶端打不開,因此八成是數據庫損壞,
所以第一步做了DROP TABLE XXXXX,然后再執行上面CREATE TABLE命令,然后就出現了上面的錯誤。
解決辦法:
刪除MYSQL安裝目錄下的data下該表所屬的數據庫目錄下有個xxxxx.ibd文件即可。