Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

database upgrade problem
Jr. Member
Total Posts:  4
Joined:  2009-02-05


I’m hoping someone can please help. I’ve successfully upgraded a previous website from Magento to just fine. Now I’m trying it on a site and am getting an error.

These are the upgrade steps I have taken (as I don’t want to do it on the live account just yet).

1) I copied the db from one account on the server to another test account. No errors on copy.
2) I installed Magento fresh on the new account.
3) I setup the local.xml file with the correct info to access the copied database.
4) I copied the media directory over to the new test account.
5) I ran the homepage in my browser to upgrade the database and got the following error (below).

If anyone can give me some pointers I would really appreciate it. I’ve searched the forums & Google and nothing has worked so far. Really running out of time on this one!

Thanks in advance.

a:5:{i:0;s:280:"Error in file: "/home/greatbhc/public_html/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-" - SQLSTATE[HY000]: General error: 1025 Error on rename of './greatbhc_newdb/#sql-3942_49269' to './greatbhc_newdb/catalog_product_entity' (errno: 150)";i:1;s:998:"#0 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '', '')
#2 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('', '')
#3 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/greatbhc/public_html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/greatbhc/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/greatbhc/public_html/index.php(87): Mage::run('', 'store')
#8 {main}"
Magento Community Magento Community
Magento Community
Magento Community
Brent W Peterson
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN

Try another new version of the backup database. Also you can hit the upgrade again to see if it will make it past the error. (You can not simply hit refresh as you install is stuck on the error page, you need to go to the root of the site again.)

Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  20
Joined:  2009-02-04

I am getting a similar error when doing the same.


Error in file: “/home2/klutcom1/public_html/mag17/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-” - SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./klutcom1_mag17/#sql-113a1_c4965’ to ‘./klutcom1_mag17/sales_flat_order_item’ (errno: 150)

#0 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘’, ‘’)
#2 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’’, ‘’)
#3 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home2/klutcom1/public_html/mag17/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home2/klutcom1/public_html/mag17/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home2/klutcom1/public_html/mag17/index.php(87): Mage::run(’’, ‘store’)
#8 {main}

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top