Magento安装填好数据库等信息提交报错:Database server does not support the InnoDB storage engine
原因分析:由于Mysql 5.6版本已经丢弃了 “have_innodb”这个函数. 而Magento1.7.0.2以下,都是使用该函数检测Mysql是否激活了InnodB引擎。
处理方法:
找到app\code\core\Mage\Install\Model\Installer\Db\Mysql4.php文件,打开查找并编辑supportEngine()方法,在原方法中的return前添加以下代码:
if(!isset($variables['have_innodb'])) {
$engines = $this->_getConnection()->fetchPairs('SHOW ENGINES');
return (isset($engines['InnoDB']) && ($engines['InnoDB'] == 'DEFAULT' || $engines['InnoDB'] == 'YES'));
}
在尝试安装Magento时遇到错误提示:Database server does not support the InnoDB storage engine。该问题源于MySQL 5.6及以上版本不再支持'have_innodb'函数,而Magento 1.7.0.2之前的版本依赖此函数检查InnoDB引擎。解决方法是修改appcodecoreMageInstallModelInstallerDbMysql4.php文件,在supportEngine()方法中添加代码来检查InnoDB引擎。
1605

被折叠的 条评论
为什么被折叠?



