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

后端 未结 5 577
悲&欢浪女
悲&欢浪女 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:33

    1) Delete and paste Magento again

    2) Go to MySQL >> my.ini and change the code to the following (check version number):

    # Uncomment the following if you are using InnoDB tables
    innodb_data_home_dir = D:/wamp/bin/mysql/mysql5.5.28/data/
    innodb_data_file_path = ibdata1:10M:autoextend
    innodb_log_group_home_dir = D:/wamp/bin/mysql/mysql5.5.28/data/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    innodb_buffer_pool_size = 16M
    innodb_additional_mem_pool_size = 4M
    

    3) Go to app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php and change the code to the following:

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

    4) Go to phpMyAdmin and make sure your user is on host 127.0.0.1 (not "localhost" not any "%")

    I wouldn't have got it to work without the contributions of people on this site, so the credit goes to the two above me and some other users from other pages.

    This should hopefully fix all issues, it worked with me.

    0 讨论(0)
  • 2021-02-03 12:36

    If I rememebr correctly WAMP Server comes with innodb disabled, but it is a simple job to activate it.

    Edit the my.ini ( use the wampmanager menus to edit it )

    Look for this line, its roughly around line 90 - 100, you will see a set of paramteters all commented out. Remove the # so it is no longer a comment. You may have to do a little reasearch on what the params mean and then you may have to do some tweeking to get innodb working well, but just uncommenting them should activate innodb.

    # Uncomment the following if you are using InnoDB tables
    innodb_data_home_dir = D:/wamp/bin/mysql/mysql5.5.28/data/
    innodb_data_file_path = ibdata1:64M:autoextend
    innodb_log_group_home_dir = D:/wamp/bin/mysql/mysql5.5.28/data/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    innodb_buffer_pool_size = 16M
    innodb_additional_mem_pool_size = 4M
    

    Restart MySQL service after you have changed and saved the ini file.

    0 讨论(0)
  • 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;
    }
    
    0 讨论(0)
  • 2021-02-03 12:41

    Its happening because newer version does not support the innodb storage. Please just install the previous version of mysql of Wamp from their official website. No need to install the complete wamp. Just the mysql. And when required just select the right version of mysql from wamp.

    0 讨论(0)
  • 2021-02-03 12:49

    Go To Line 59 of the file app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php

    Replace:

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

    With this:

    public function supportEngine()
    {
        $variables  = $this->_getConnection()
            ->fetchPairs('SHOW ENGINES');
        return (isset($variables['InnoDB']) && $variables['InnoDB'] != 'NO');
    }
    
    0 讨论(0)
提交回复
热议问题