Mar 022012
 

Problem: You encounter the following error during the installation of Magento Commerce 1.6.1 or 1.7.0.0 Beta (probably also other versions 1.6+):

a:5:{i:0;s:216:"Error in file: "/banana/shop/app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php" – SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'period'";i:1;s:1010:"#0 /banana/shop/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: …')
#1 /banana/shop/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0', '1.6.0.3')
#2 /banana/shop/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.3')
#3 /banana/shop/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /banana/shop/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /banana/shop/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /banana/shop/app/Mage.php(682): Mage_Core_Model_App->run(Array)
#7 /banana/shop/index.php(87): Mage::run(", 'store')
#8 {main}";s:3:"url";s:37:"/index.php/install/wizard/configPost/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Solution:

Drop the database you are installing Magento into, and recreate it, this time with the encoding utf8_unicode_ci .

The problem appears if the encoding is set to utf8_bin.

Also see this page:

We tried the fix discussed there first, maybe you need to do both.

Related posts:

  1. Concrete 5 SQL errors during installation
  2. Windows 7 Hibernation Problems
  3. Concrete5 errors
  4. MediaWiki 1.17 and Bad Behaviour problems
  5. Concrete5 does not update correctly?

Related posts brought to you by Yet Another Related Posts Plugin.