Magento 1.9 – Problem When Installing Sample Data

databaseinstallmagento-1.9

I got this exception when installing Magento CE 1.9

Error in file: "~/app/code/core/Mage/Core/sql/core_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'core_config_data' already exists

Trace:
#0 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.4')
#2 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.4')
#3 ~/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ~/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ~/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 ~/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 ~/index.php(90): Mage::run('', 'store')
#8 {main}

Any ideas? Because this is the most strange error I ever seen since I played with Magento CE. 🙁

Best Answer

If you need to install sample data, please execute this: mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql to install your data to the database first. Sometime, Magento is not behave well :)

Now you can start installing at the beginning without any error!

Related Topic