Question

I am trying to reindex Category Flat Data via ssh with the command php indexer.php --reindex catalog_category_flat but I am getting error as below. I have tried all the solutions posted on the forum but I am not able to fix the issue. Can you look into the error log and let me know if there is any way to fix the issue?

[cpanelusername@server shell]$ php indexer.php --reindex catalog_category_flat
Category Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1005 Can't create table 'cpanelusername_magento.catalog_category_flat_store_1' (errno: -1)' in /home/cpanelusername/public_html/catalog/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/cpanelusername/public_html/catalog/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/cpanelusername/public_html/catalog/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/cpanelusername/public_html/catalog/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/cpanelusername/public_html/catalog/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/cpanelusername/public_html/catalog/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE `c...', Array)
#5 /home/cpanelusername/public_html/catalog/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE `c...', Array)
#6 /home/cpanelusername/public_html/catalog/lib/Varien/Db/Adapter/Pdo/Mysql.php(2039): Varien_Db_Adapter_Pdo_Mysql->query('CREATE TABLE `c...')
#7 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(604): Varien_Db_Adapter_Pdo_Mysql->createTable(Object(Varien_Db_Ddl_Table))
#8 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1418): Mage_Catalog_Model_Resource_Category_Flat->_createTable('1')
#9 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php(1431): Mage_Catalog_Model_Resource_Category_Flat->_createTables()
#10 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(246): Mage_Catalog_Model_Resource_Category_Flat->reindexAll()
#11 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#12 /home/cpanelusername/public_html/catalog/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#13 /home/cpanelusername/public_html/catalog/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#14 /home/cpanelusername/public_html/catalog/shell/indexer.php(198): Mage_Shell_Compiler->run()
#15 {main}

I dont have any DB table called cpanelusername_magento.catalog_category_flat_store_1

No correct solution

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