user2517781
user2517781

Reputation: 91

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

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 not support InnoDB storage engine.

I really don't know what to do. Can someone help?

Upvotes: 9

Views: 29045

Answers (5)

user2718285
user2718285

Reputation: 600

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

Upvotes: 5

Ahmad Sharif
Ahmad Sharif

Reputation: 4435

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.

Upvotes: 0

Mohammad
Mohammad

Reputation: 111

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.

Upvotes: 0

Dhaval
Dhaval

Reputation: 875

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

Upvotes: 31

RiggsFolly
RiggsFolly

Reputation: 94642

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.

Upvotes: 3

Related Questions