Failed to read auto-increment value from storage engine catalog_product_entity_varchar
-
15-04-2021 - |
سؤال
Can't add a new product and get an error.
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine, query was: INSERT IGNORE INTO catalog_product_entity_varchar
(entity_id
,attribute_id
,store_id
,value
) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?)
Similar issue: https://github.com/magento/magento2/issues/21890
Please help us to solve this.
Thanks
المحلول
Run this query on your database
ALTER TABLE `catalog_product_entity_varchar` AUTO_INCREMENT = // last record's value_id+1 which is currently present in your table e.g if value_id is 5 than AUTO_INCREMENT = 6. If table is empty than put AUTO_INCREMENT = 1;
Don't forget to create a backup of your DB first.
لا تنتمي إلى magento.stackexchange