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

15,416

The error message is telling you that Magento tries to create a table which already exists. This takes place in an upgrade script and was probably caused by an incomplete previous run of said upgrade script. Magento executes upgrade scripts, but only marks them done when they complete without error. Even an incompletely run script can have created tables, though, and next time Magento tries to run that update script the exstance of those tables cause a problem.

So you can either do some Database work and do some tweeking like removing the tables in question (with saving the data if needed), or you redo your Magento Installation.

This can also be caused by recently installed extensions, if so uninstalling them with the Connect Manager and reinstalling them might work.

Share:
15,416
Ankur Gupta
Author by

Ankur Gupta

Working as a software Developer in .Net Technology, and i like coding & solve the code related problem. i am passionate about coding and learn new technology.

Updated on June 04, 2022

Comments

  • Ankur Gupta
    Ankur Gupta almost 2 years

    I have installed magento 1.9 CE on my local server and it was working fine. Suddenly it stopped working and shows error like

    There has been an Error processing your request.

    When I check error report from report folder then I got logs like

    a:5:{i:0;s:219:"Error in file: "C:\wamp\www\anzonline\app\code\core\Mage\XmlConnect\sql\xmlconnect_setup\upgrade-1.6.0.0-1.6.0.0.1.php" - 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', '1.6.0.0', '1.6.0.0.1')
    #2 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.0.1')
    #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 have found several solutions from Google but none of those worked out for me example.