九月 27th, 2016

解决Magento安装时数据库不支持InnoDB存储引擎问题

找到文件app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php的第59行:

public function supportEngine()

{

$variables  = $this->_getConnection()

->fetchPairs(‘SHOW VARIABLES’);

return (!isset($variables[‘have_innodb’]) || $variables[‘have_innodb’] != ‘YES’) ? false : true;

}

替换为:

public function supportEngine()

{

$variables  = $this->_getConnection()

->fetchPairs(‘SHOW ENGINES’);

return (isset($variables[‘InnoDB’]) && $variables[‘InnoDB’] != ‘NO’);

最后一步重启数据库 service mysqld restart

Comments are closed.