mysqldude
Error codes › MY-012126

MySQL error MY-012126 ER_IB_MSG_UNEXPECTED_FILE_EXISTS

Error messageThe file '…' already exists though the corresponding table did not exist. Have you moved InnoDB .ibd files around without using the SQL commands DISCARD TABLESPACE and IMPORT TABLESPACE, or did mysqld crash in the middle of CREATE TABLE? You can resolve the problem by removing the file '…' under the 'datadir' of MySQL.
SymbolER_IB_MSG_UNEXPECTED_FILE_EXISTS
SQLSTATEHY000
TypeServer error-log message
Versionssince 8.0.11 active
How the message changed between versions
MySQL fromSymbolMessage
8.0.11ER_IB_MSG_302The file '%s' already exists though the corresponding table did not exist. Have you moved InnoDB .ibd files around without using the SQL commands DISCARD TABLESPACE and IMPORT TABLESPACE, or did mysqld crash in the middle of CREATE TABLE? You can resolve the problem by removing the file '%s' under the 'datadir' of MySQL.
8.0.20ER_IB_MSG_UNEXPECTED_FILE_EXISTSThe file '%s' already exists though the corresponding table did not exist. Have you moved InnoDB .ibd files around without using the SQL commands DISCARD TABLESPACE and IMPORT TABLESPACE, or did mysqld crash in the middle of CREATE TABLE? You can resolve the problem by removing the file '%s' under the 'datadir' of MySQL.

Messages numbered MY-010000 and up are written to the MySQL server error log (MySQL 8.0 and later); they are not returned to clients.