I am getting this strange error while reindex, and I cannot find any solution on google or on stackoverflow.

Stock index exception: SQLSTATE[42S01]: Base table or view already exists: 1050 Table './mydb/cataloginventory_stock_status_outdated' already exists, query was: RENAME TABLE cataloginventory_stock_status TO cataloginventory_stock_status_outdated,cataloginventory_stock_status_replica TO cataloginventory_stock_status,cataloginventory_stock_status_outdated TO cataloginventory_stock_status_replica

already checked in /var/lib/mysql/mydb/ and there is no cataloginventory_stock_status_outdated table

I am getting the same error for catalog_category_product_index_store1_outdated Any help please.

  • anybody have an idea about this ticket?
    – m2dubai
    May 20, 2021 at 8:54
  • @m2dubai please check my answer below
    – SoCix
    May 20, 2021 at 10:51

1 Answer 1


This is how I solved the problem if someone passes from here

using terminal

cd /var/lib/mysql/dbname/


search for the table with no tablename.frm and move to a safe place or delete the tablename.ibd

example (here renaming the table)

mv customer_grid_flat.ibd customer_grid_flat.ibd.old

now reindex, the tables will be regenerated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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