zoukankan      html  css  js  c++  java
  • magento 安装时 Database server does not support the InnoDB storage engine 的解决办法

    magento 安装时 Database server does not support the InnoDB storage engine 的解决办法

     打开appcodecoreMageInstallModelInstallerDbMysql4.php文件,编辑supportEngine方法,在原方法中的return前添加以下代码:
    1.  
      if (!isset($variables['have_innodb'])) {
    2.  
      $engines = $this->_getConnection()->fetchPairs('SHOW ENGINES');
    3.  
      return (isset($engines['InnoDB']) && ($engines['InnoDB'] == 'DEFAULT' || $engines['InnoDB'] == 'YES'));
    4.  
      }

    报错的原因是因为Mysql 5.6版本已经已经丢弃了“have_innodb”这个函数.而Magento1.7.0.2以下,都是使用该函数检测Mysql是否激活了InnodB引擎。

    =================  测试如下 ===================================

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

  • 相关阅读:
    路径
    aspx.cs调用js方法
    计算字符串中每种字母出现的次数
    [转载]获取2个集合List<T>的共同元素
    [转载]行列转换
    [转载]UNION合并查询
    [转载]Case When Then
    [转载]CAST-CONVERT两个函数进行类型转换时的异同点
    [转载]404错误页面设置
    [转载]JQ小知识
  • 原文地址:https://www.cnblogs.com/alex-13/p/14989507.html
Copyright © 2011-2022 走看看