Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Database server does not support the InnoDB storage engine. 
 
alainroger
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2013-01-11
 

Hi,

i’m new to Magento so sorry if this question has been already asked, but i didn’t find answer.

I have a NAS that i use as webserver at home and when i install Magento 1.7.02, except the same pdomysql error i get:

Database server does not support the InnoDB storage engine.

when i run PHPMySQL and run the following SQL statement:

SHOW VARIABLES LIKE 'have_innodb';

i got no returned record.

when i check enabled engines (show engines) on my MySQL system i got the result as attached screenshot.
as we can see default engine is InnoDB, so where is the problem ?

thx.

Image Attachments
innodb-engine-as-default.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
alainroger
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2013-01-11
 

Ok, i just discovered that MySQL 5.6 does not includes anymore the variable have_innodb but now it’s called innodb only. So the following code:

public function supportEngine()
    
{
        $variables  
$this->_getConnection()
            ->
fetchPairs('SHOW VARIABLES');
        return (!isset(
$variables['have_innodb']) || $variables['have_innodb'!= 'YES') ? false true;
    
}

should be changed by:

public function supportEngine()
    
{
        $variables  
$this->_getConnection()
            ->
fetchPairs('SHOW ENGINES');
        return (isset(
$variables['InnoDB']) && $variables['InnoDB'!= 'NO');
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
SmartDummy
Jr. Member
 
Total Posts:  1
Joined:  2013-06-19
 

I got the same issue. In MySQL it shows InnoDB as DEFAULT, but the magento installer still says \"Database server does not support the InnoDB storage engine.\”

I changed the downloader.php file and it works.

change
query(\’show variables like \\\’have_innodb\\\’;\’);
to
query(\’show variables like \\\’innodb\\\’;\’);

and change
if ($innoDb != \’YES\’)
into
if ($innoDb == \’NO\’)

 
Magento Community Magento Community
Magento Community
Magento Community
 
ronaldoutline
Jr. Member
 
Total Posts:  1
Joined:  2012-05-20
 

Just to make it really clear

the content of Mysql4.php in
app/code/core/Mage/Install/Model/Installer/DB
is following

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Install
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* Mysql resource data model
*
* @category Mage
* @package Mage_Install
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Install_Model_Installer_Db_Mysql4 extends Mage_Install_Model_Installer_Db_Abstract
{
/**
* Retrieve DB server version
*
* @return string (string version number | \’undefined\’)
*/
public function getVersion()
{
$version = $this->_getConnection()
->fetchOne(\’SELECT VERSION()\’);
$version = $version ? $version : \’undefined\’;
$match = array();
if (preg_match(\"#^([0-9\\.]+)#\", $version, $match)) {
$version = $match[0];
}
return $version;
}

/**
* Check InnoDB support
*
* @return bool
*/
public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs(\’SHOW VARIABLES\’);
return (isset($variables[\’InnoDB\’]) && $variables[\’InnoDB\’] != \’NO\’) ? false : true;
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
yuraq
Jr. Member
 
Total Posts:  1
Joined:  2013-08-12
 

I have experienced the same issue with LAMPP and Magento 1.7.0

storage_engine seems to be more reliable variable…

This worked

public function supportEngine()
{
$variables = $this->_getConnection()
->fetchPairs(’SHOW VARIABLES’);
return (!isset($variables[’storage_engine’]) || $variables[’storage_engine’] != ‘InnoDB’) ? false : true;
}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top