Question

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

enter image description here

Please help us to solve this.

Thanks

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top