row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

2013年11月20日星期三

How to make Magento1.7.0.2 support Mysql5.6

Recently deployed a new Magento 1.7.0.2 on a new server, Magento has been an error in the installation part of said InnodB not installed (Database server does not support the InnoDB storage engine).

Whether I show engines or phpinfo () to view, my InnodB are normal.

Behind the process in google finally found the reason, look here for everyone to share.

First, the error is because Mysql 5.6.1 version has been discarded "have_innodb" This function while Magento1.7.0.2 the following, are using this function detects whether Mysql activated InnodB engine.

So, we only need to modify the code to modify the installation. Magento can be a normal installation :)

First, open the file: app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php

Probably in line 65 you will find the following code:

?
1
2
$ variables = $ this-> _getConnection ()
            -> fetchPairs ('SHOW VARIABLES');
Then add this code on the back the following code:

if (!isset($variables['have_innodb'])) {
        $engines = $this->_getConnection()->fetchPairs('SHOW ENGINES');
        return (isset($engines['InnoDB']) && ($engines['InnoDB'] == 'DEFAULT' || $engines['InnoDB'] == 'YES'));
}
Well, this can be normal under your Magento installation. .

PS: Database server does not support the InnoDB storage engine that errors are not detected InnodB Magento generated by the engine, the premise of using the above method is needed to determine InnodB has been properly installed and running can be mysql command line, enter: show engines; mysql check what engine load.

没有评论:

发表评论

row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2