3

I am getting this error

Database server does not support the InnoDB storage engine. 

with MySQL 5.6 on my MAC OSX Maverick

mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO 
  • It would be great is anyone has a better answer for this – brentwpeterson Nov 14 '13 at 13:46
4

There is a way of doing this by adding a rewrite rather than changing the core code. Original answer

Config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_InstallBugfix>
            <version>0.1.0</version>
        </Company_InstallBugfix>
    </modules>
    <global>
        <models>
            <installbugfix>
                <class>Company_InstallBugfix_Model</class>
            </installbugfix>
            <install>
                <rewrite>
                    <installer_db_mysql4>Company_InstallBugfix_Model_Installer_Db_Mysql4</installer_db_mysql4>
                </rewrite>
            </install>
        </models>
    </global>
</config>

File Company_InstallBugfix_Model_Installer_Db_Mysql4

<?php
class Company_InstallBugfix_Model_Installer_Db_Mysql4 extends Mage_Install_Model_Installer_Db_Mysql4
{
    /**
     * Check InnoDB support
     *
     * @return bool
     */
    public function supportEngine()
    {
        $supportsEngine = parent::supportEngine();
        if ($supportsEngine) {
            return true;
        }
        $variables = $this
                     ->_getConnection()
                     ->fetchPairs('SHOW ENGINES');
        return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
    }
}

Also this issue was fixed in Magento version 1.8 where the function looks as follows:

/**
 * Check InnoDB support
 *
 * @return bool
 */
public function supportEngine()
{
    $variables  = $this->_getConnection()
        ->fetchPairs('SHOW ENGINES');
    return isset($variables['InnoDB']) && ($variables['InnoDB'] == 'DEFAULT' || $variables['InnoDB'] == 'YES');
}
| improve this answer | |
5

I am sure there is a better answer than this

diff --git a/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php b/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
index bc482b5..ce55834 100644
--- a/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
+++ b/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
@@ -60,6 +60,10 @@ class Mage_Install_Model_Installer_Db_Mysql4 extends Mage_Install_Model_Installe
     {
         $variables  = $this->_getConnection()
             ->fetchPairs('SHOW VARIABLES');
+        if (substr($variables['version'], 0, 3) == '5.6') {
+            return true;
+        } else {
             return (!isset($variables['have_innodb']) || $variables['have_innodb'] != 'YES') ? false : true;
         }
+    }
 }

The above worked

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.