title: Magento Category Flat Data will not reindex error 'There was a problem with reindexing process.'
body: <p>I have recently moved a magento installation of version 1.5.0.1 to a live server however no products are showing on the front end. After inspecting the indexes i see that the Category Flat Data index is needs re-indexing however when trying to re-index this i get an error notice box saying  'There was a problem with reindexing process.'</p>
  
  <p>So far i have tried the following </p>
  
  <ol>
  <li><p>Resetting file permissions 755 for folders, 664 for files </p>
  
  <p>find . -type f -exec chmod 644 {} \;</p>
  
  <p>find . -type d -exec chmod 755 {} \;</p></li>
  <li><p>Deleting the contents of the var folder including cache and locks folders </p></li>
  <li><p>trying to process the indexes manually through the console using the command below from public_html/shell</p>
  
  <blockquote>
    <p>php indexer.php reindexall</p>
  </blockquote></li>
  </ol>
  
  <p>I have inspected the error logs and the following is present </p>
  
  <pre><code>2011-09-26T08:16:11+00:00 DEBUG (7): Exception message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
  `store_id` smallint(5) unsigned not null default '0',
  `all_children` text defau' at line 10
  Trace: #0 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo-&gt;_execute(Array)
  #1 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement-&gt;execute(Array)
  #2 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract-&gt;query('CREATE TABLE `c...', Array)
  #3 /home/bboutique/www.bassboutique.co.uk/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract-&gt;query('CREATE TABLE `c...', Array)
  #4 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(526): Varien_Db_Adapter_Pdo_Mysql-&gt;query('CREATE TABLE `c...')
  #5 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(433): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat-&gt;_createTable('1')
  #6 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(237): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat-&gt;rebuild()
  #7 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Category_Indexer_Flat-&gt;reindexAll()
  #8 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process-&gt;reindexAll()
  #9 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process-&gt;reindexEverything()
  #10 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController-&gt;reindexProcessAction()
  #11 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action-&gt;dispatch('reindexProcess')
  #12 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard-&gt;match(Object(Mage_Core_Controller_Request_Http))
  #13 /home/bboutique/www.bassboutique.co.uk/public_html/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front-&gt;dispatch()
  #14 /home/bboutique/www.bassboutique.co.uk/public_html/app/Mage.php(627): Mage_Core_Model_App-&gt;run(Array)
  #15 /home/bboutique/www.bassboutique.co.uk/public_html/index.php(80): Mage::run('', 'store')
  #16 {main}
  </code></pre>
  
  <p>Any help would be much appreciated </p>
  
  <p>Thanks</p>
  
  <p>Ian </p>