Magento install se queja de que falta InnoDB cuando está disponible


Durante la instalación, Magento produce el siguiente error:

El servidor de base de datos no admite el motor de almacenamiento InnoDB.

He arreglado todas las dependencias para Magento, y he comprobado dos veces con MySQL en la línea de comandos usando MOTORES SHOW y definitivamente tengo InnoDB disponible (también el motor de almacenamiento predeterminado).

Esto no es un problema sobre el acceso a la configuración de MySQL que otros podrían haber visto en su instalación.

Nota: Esto se está ejecutando en un Mac Pro (con una simple reescritura de DNS de hosts para el nombre de dominio para el que estoy desarrollando).

Author: random, 2013-03-16

7 answers

Línea 59 del archivo app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php

Sustitúyase:

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

Con esto:

public function supportEngine()
{
    $variables  = $this->_getConnection()
        ->fetchPairs('SHOW ENGINES');
    return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
}
 130
Author: Michael Benjamin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-11-30 07:17:55

O no hacer un núcleo-hack! Debe sobrescribir el Installer-Model suavemente antes de la instalación:

Pega esto en tu app/code/local/Company/InstallBugfix/etc/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>

Y siguientes en app/code/local/Company/InstallBugfix/Model/Installer/Db/Mysql4.php:

<?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');
    }
}

Y habilita la extensión. La ventaja es que la antigua validación sigue siendo correcta, si la versión de mysql es más antigua.

 20
Author: Rokko_11,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-08-27 18:47:05

Ver 1.9.1.0 downloader.php

Poniendo esto para cualquiera que esté usando el downloader.php actualmente incluido en el instalador 1.9.1.0.

Si estás contento de que tu base de datos MySQL soporta InnoDB (Es la PREDETERMINADA) en versiones posteriores. Puede editar el archivo de forma segura para eliminar el cheque y toda la descarga que tenga lugar.

    /**
     * Check availabe InnoDB on database.
     *
     * @return Magento_Downloader_Validator
     */
    protected function _checkDbInnoDb()
    {
        if (!$this->_connection) {
            return $this;
        }
        $this->addMessage('Database server supports InnoDB storage engine');
        return $this;
    }
 4
Author: Luke,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-26 00:29:24

El error se solucionó en Magento CE 1.8, así que solo use las líneas anteriores para CE \leq 1.7

 0
Author: Rokko_11,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-09-30 06:19:42
public function supportEngine()
{
    $variables  = $this->_getConnection()->fetchPairs('SHOW ENGINES');
    return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
}
 -1
Author: anthony,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-06 11:25:59

Línea 59 del archivo app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php

Sustitúyase:

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

Con esto:

public function supportEngine()
{
 /*   
     $variables  = $this->_getConnection()
        ->fetchPairs('SHOW ENGINES');
     return (!isset($variables['have_innodb']) || $variables['have_innodb'] != 'YES') ? false : true; 
*/
    return 1;
}
 -1
Author: Magento,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-06 11:47:54

Estaba teniendo el mismo problema y la única forma en que funcionó fue cuando cambié la línea 59 del archivo app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php de:

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

Con:

public function supportEngine()
    {
        $variables  = $this->_getConnection()
            ->fetchPairs('SHOW ENGINES');
        return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'YES');
    }

Y no lo encontré en ninguna parte, así que si estás luchando te garantizo que esto lo resolverá.

 -1
Author: Wagner Maximiliano,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-30 20:43:43