cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble with database version installing Magento 2

SOLVED

Having trouble with database version installing Magento 2

Hi all, I'd like to install Magento 2 for some test purposes but during the installation the installer stops on Step 2: Add a Database.

 

I got the information "Sorry, but we support MySQL version 5.6.0 or later."

 

I tried to install Magento on "1blu.de" and on "campusspeicher.de" but both hoster don't support MySQL 5.6.x. I also raised a ticket but campusspeicher.de told me that they only support 5.5.x and there is no upgrade planned yet.

 

Is there a workaround to install Magento on this "old" MySQL version?

 

Thanks for you feedback

 

KR Holger 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Having trouble with database version installing Magento 2

I wouldn't recommend trying to run Magento 2 with MySQL 5.5 even if the workaround is possible. 

 

Here's a discussion with the Magento 2 team about Magento 2 and MySQL 5.5:-

https://github.com/magento/magento2/issues/1244

 

View solution in original post

3 REPLIES 3

Re: Having trouble with database version installing Magento 2

Sorry, there is no workaround. You need to have MySQL 5.6.0 or later.

Re: Having trouble with database version installing Magento 2

Hello,

 

 Try to update the files (of Magento 2.0):

 

To make it install with MySql 5.5:
setup/src/Magento/Setup/Model/Installer.php
line 79

 

 const MYSQL_VERSION_REQUIRED = '5.5.0';//was 5.6.0

 

 

vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
line 2122

 

                if (($indexData['TYPE'] == AdapterInterface::INDEX_TYPE_FULLTEXT)) {// && $this->isNdb($table)

 

lines 2356-2363

 

} elseif ($cDefault == Table::TIMESTAMP_INIT) {
// $cDefault = new \Zend_Db_Expr('CURRENT_TIMESTAMP');
$cDefault = false;
} elseif ($cDefault == Table::TIMESTAMP_UPDATE) {
// $cDefault = new \Zend_Db_Expr('0 ON UPDATE CURRENT_TIMESTAMP');
$cDefault = false;
} elseif ($cDefault == Table::TIMESTAMP_INIT_UPDATE) {
// $cDefault = new \Zend_Db_Expr('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP');
$cDefault = false;

 

 

To make the simple search work with MySql 5.5
vendor/magento/module-catalog-search/etc/di.xml
lines 104-115

 

<!-- <argument name="filters" xsi:type="array">
<item name="attribute" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Attribute</item>
<item name="price" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Price</item>
<item name="decimal" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Decimal</item>
<item name="category" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Category</item>
</argument>-->
<argument name="filters" xsi:type="array">
<item name="attribute" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Attribute</item>
<item name="price" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Price</item>
<item name="decimal" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Decimal</item>
<item name="category" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Category</item>
</argument>
 

 

lines 120-133

 

<!--
<argument name="filters" xsi:type="array">
<item name="attribute" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Attribute</item>
<item name="price" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Price</item>
<item name="decimal" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Decimal</item>
<item name="category" xsi:type="string">Magento\CatalogSearch\Model\Layer\Filter\Category</item>
</argument>-->
<argument name="filterableAttributes" xsi:type="object">Magento\Catalog\Model\Layer\Search\FilterableAttributeList</argument>
<argument name="filters" xsi:type="array">
<item name="attribute" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Attribute</item>
<item name="price" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Price</item>
<item name="decimal" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Decimal</item>
<item name="category" xsi:type="string">Magento\Catalog\Model\Layer\Filter\Category</item>
</argument>
 

 

lines 137-186

 

 

<!--
<virtualType name="Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory" type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
<arguments>
<argument name="instanceName" xsi:type="string">Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection</argument>
</arguments>
</virtualType>
<type name="Magento\CatalogSearch\Model\Layer\Category\ItemCollectionProvider">
<arguments>
<argument name="collectionFactory" xsi:type="object">Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory</argument>
</arguments>
</type>
-->

<type name="Magento\CatalogSearch\Model\Layer\Category\ItemCollectionProvider">
<arguments>
<argument name="collectionFactory" xsi:type="object">Magento\Catalog\Model\ResourceModel\Product\CollectionFactory</argument>
</arguments>
</type>


<!--
<virtualType name="Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollection" type="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection">
<arguments>
<argument name="searchRequestName" xsi:type="string">quick_search_container</argument>
</arguments>
</virtualType>
<virtualType name="Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollectionFactory" type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
<arguments>
<argument name="instanceName" xsi:type="string">Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollection</argument>
</arguments>
</virtualType>
<virtualType name="Magento\CatalogSearch\Model\Layer\Search\ItemCollectionProvider" type="Magento\Catalog\Model\Layer\Search\ItemCollectionProvider">
<arguments>
<argument name="collectionFactory" xsi:type="object">Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollectionFactory</argument>
</arguments>
</virtualType>
-->

<virtualType name="simpleSearchCollection" type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
<arguments>
<argument name="instanceName" xsi:type="string">Magento\CatalogSearch\Model\ResourceModel\Search\Collection</argument>
</arguments>
</virtualType>
<virtualType name="Magento\CatalogSearch\Model\Layer\Search\ItemCollectionProvider" type="Magento\Catalog\Model\Layer\Search\ItemCollectionProvider">
<arguments>
<argument name="collectionFactory" xsi:type="object">simpleSearchCollection</argument>
</arguments>
</virtualType>
 

 

 

To hide the Advanced Search link because it does not work with this modification.

Rename the files:
vendor/magento/module-catalog-search/view/frontend/layout/catalogsearch_advanced_index__.xml
vendor/magento/module-catalog-search/view/frontend/layout/default__.xml

 

 

 

Do not use this for production website !

 

 

 

Stanislav

Re: Having trouble with database version installing Magento 2

I wouldn't recommend trying to run Magento 2 with MySQL 5.5 even if the workaround is possible. 

 

Here's a discussion with the Magento 2 team about Magento 2 and MySQL 5.5:-

https://github.com/magento/magento2/issues/1244