Completely removing InnoDb tables To cut a long story short, I deleted several .idb files and then tried to re-import them from a .sql file.

I'd imagine there is some relic of the old tables somewhere. Does anyone know what to remove or if I can have MySQL re-build its internal tables. These are the only InnoDb tables I have; the rest are MyISAM
You deleted the *.ibd files, but entries in the InnoDB dictionary remain.


Create empty temporary database. Let it be tmp1234
Move all tables from the original database to tmp1234
Drop the original database (it’s empty by now, all tables are in
tmp1234)
Create the original database again
Move all tables from the temporary database to the original one.
Drop the empty temporary database.


See more details on a similar case https://twindb.com/resolving-error-1050-42s01-at-line-1-table-sakilasql-ib712-already-exists/