1

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

  • Not sure exactly what I did, but a combination of making sure all the .idb files have been deleted, FLUSH TABLES and a restart may have done the trick. – Kohjah Breese Jun 6 '15 at 1:19
3

You deleted the *.ibd files, but entries in the InnoDB dictionary remain.

  1. Create empty temporary database. Let it be tmp1234
  2. Move all tables from the original database to tmp1234
  3. Drop the original database (it’s empty by now, all tables are in tmp1234)
  4. Create the original database again
  5. Move all tables from the temporary database to the original one.
  6. 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/

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.