my.cnf中
找到如下的代码:
skip-innodb
修改为如下:
#skip-innodb
如果已经注释掉了,看下你的mysql版本,因为Mysql 5.6.1版本已经已经丢弃了“have_innodb”这个函数.而Magento1.7.0.2以下,都是使用该函数检测Mysql是否激活了InnodB引擎。
So,我们只需要修改修改安装的代码。就能正常安装Magento了:)
首先,打开文件:app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
大概在65行你会找到以下代码:
$variables = $this->_getConnection()->fetchPairs('SHOW VARIABLES');
然后再这段代码后面添加上以下代码:
if (!isset($variables['have_innodb'])) {$engines = $this->_getConnection()->fetchPairs('SHOW ENGINES');return (isset($engines['InnoDB']) && ($engines['InnoDB'] == 'DEFAULT' || $engines['InnoDB'] == 'YES')); }