I'm trying to install Magento on a local server using WAMP. InnoDB is set as the default engine but it still shows me the message:
Database server does not support InnoDB storage engine.
I really don't know what to do. Can someone help?
Go To Line 59 of the file app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
Replace:
public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs('SHOW VARIABLES');
return (!isset($variables['have_innodb']) || $variables['have_innodb'] != 'YES') ? false : true;
}
With this:
public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs('SHOW ENGINES');
return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
}
I have encountered this error in default installation from downloader.
because the downloader relied on have_innodb variable, that is from mysql version 5.6.1. unavailable and official documentation (http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_have_innodb) states to use "SHOW ENGINES" instead, I have modified the downloader file accordingly:
/**
* Check availabe InnoDB on database.
*
* @return Magento_Downloader_Validator
*/
protected function _checkDbInnoDb()
{
if (!$this->_connection) {
return $this;
}
$result = $this->_connection->query('SHOW ENGINES');
while($row = $result->fetch()){
if($row["Engine"] == "InnoDB" && $row["Support"] != "NO"){
$this->addMessage('Database server supports InnoDB storage engine');
return $this;
}
}
$this->addError('Database server does not support InnoDB storage engine');
return $this;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With