0

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. :-(

3
  • are you using old database? Commented Jan 9, 2015 at 6:09
  • @Manik: I'm using old database 1.9.0.0 and old source code too. Commented Jan 9, 2015 at 6:11
  • The sample data will need to be installed on a clean database with no previous entries. Commented Jan 9, 2015 at 7:09

2 Answers 2

1

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!

0
Firstly backup your database in a speprate folder.
Backup your admin table also..alone.
Now remove database or empty database with whole table.
No import sql sample data in your data base.
For this also optimise your mysql.

Now After importing whole sample database.
Go find table 'core_config_data'  
In that  In that config id 6 and 7...

change the value there

like'

web/unsecure/base_url  use here your http://example.com/
web/secure/base_url                  https://example.com/  if you have https

also replace admin_user table by which one you keep backup from old...

now remove cache..

re-run your site....it will works fine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.