Error processing your query: SQLSTATE [42S01]: base table or view already exists: in magento 1.9

I installed magento 1.9 CE on my local server and it worked fine. Suddenly it stops working and shows an error like

An error occurred while processing your request.

When I check the error report from the report folder, I get logs like

a:5:{i:0;s:219:"Error in file: "C:\wamp\www\anzonline\app\code\core\Mage\XmlConnect\sql\xmlconnect_setup\upgrade-" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'xmlconnect_images' already exists";i:1;s:950:"
#0 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '', '')
#2 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('', '')
#3 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 C:\wamp\www\anzonline\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#7 C:\wamp\www\anzonline\index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:11:"/anzonline/";s:11:"script_name";s:20:"/anzonline/index.php";s:4:"skin";s:7:"default";}


I found several solutions from Google

, but none of them worked out an example for me .


source to share

2 answers

The error message says that Magento is trying to create a table that already exists. This happens when updating the script and is probably caused by an incomplete previous run of the specified update script. Magento executes update scripts, but only marks them when they complete without error. However, even an incomplete script run can create tables, and next time Magento tries to run this update script, these tables appearing will cause a problem.

So you can either do some work with the database, or tease a little like dropping tables (keeping data intact if needed) or re-installing Magento.

It can also be caused by recently installed extensions, if you can uninstall them using the Connection Manager and reinstall them.




TABLE DROP IF EXISTS xmlconnect_images;

then, update your brown. This works for me.

You can clear the cache if you don't see any changes:

To clear the cache, simply delete everything from the / var / cache directory and then reload the website in your browser.

rm -rf magento / var / cache / *

To clear all sessions, you can also delete everything from the / var / session folder in your Magento installation folder.

rm -rf magento / var / session / *



All Articles