InnoDB working, still showing “Database server does not support InnoDB storage engine message”

后端 未结 5 580
悲&欢浪女
悲&欢浪女 2021-02-03 12:14

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

5条回答
  •  情歌与酒
    2021-02-03 12:37

    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;
    }
    

提交回复
热议问题