Topic: Mysql2::Error: Can't create table (errno: 121) debugging tips
I've been struggling with this error for days, I could not find anything helpfull online, at least in my case. I resolved it via a workaround and I'd like to share what I found out.
I got this error while running rake db:migrate
I was trying to create a table named "weight_equivalents". The exact same migration code with a different table name would work.
My work around was to rename the table as "weight_translations" instead. When I went into PhpMyAdmin to then rename my table as "weight_equivalents", I got an error message saying :
#1050 - Table './recipe_development/weight_equivalents' already exists
I had deleted the table weight_equivalents before, and it was not anymore listed in my tables list for this database.
I think this is due to a bug in mysql and/or my database got corrupted.
I'd like to move further in this bug investigation: does anyone know on how to fully delete this corrupted table in order for me to run the correct migration in first place (with table name "weight_equivalents") ?