Legacy Mysql Search

swissup/module-search-mysql-legacy

MySQL is no longer supported for search since Magento 2.4. This extension brings back the usage of the MySQL search engine on Magento 2.

Installs cleanlyBuild passingTrusted vendorSemVer violations (80% compliant)

Supported Magento versions: 2.4.9

94,648 installs★ 105 starsLatest: v1.1.13Released 2026-02-26License: OSL-3.0

composer require swissup/module-search-mysql-legacy

README

Reproduced from the package’s own README, under its own license, as of 2026-09-13. Links and images point back at the source repository.

Legacy Mysql Search

It's a magento2-module for the metapackage.

The news sometimes isn't good, but there is always a way out. Yes, MySQL is no longer supported for search since Magento 2.4. And you must install Elasticsearch 7.6.x before upgrading to the latest Magento version.

Elastic search is a great solution. Even so, a lot of our customers still prefer using hostings that don’t have it. Let us help you to install Magento 2.4 without Elastic search enabled.

We released the Legacy MySQL Search module for Magento 2

We integrated Magento 2.3.5 MySQL Search mechanism with Magento 2.4. The Legacy MySQL Search module enables a new value in the Search Engine drop-down of Catalog Search config settings.

So you don’t need things to get complicated. You have simply to choose the "Legacy MySQL (Deprecated) value" in drop-down.

the_new_legacy_mysql_search_module_for_magento_2-1

Installation

For clients

There are several ways to install extension for clients:

  1. If you've bought the product at Magento's Marketplace - use Marketplace installation instructions

  2. Otherwise, you have two options:

For maintainers
cd <magento_root>
composer config repositories.swissup composer https://docs.swissuplabs.com/packages/
composer require swissup/module-search-mysql-legacy --prefer-source --ignore-platform-reqs
bin/magento module:enable Swissup_SearchMysqlLegacy Swissup_Core
bin/magento setup:upgrade --safe-mode=1
bin/magento setup:di:compile
bin/magento indexer:reindex catalogsearch_fulltext

F.A.Q

How to install Magento 2.4.0 without Elasticsearch require during installation?

Use --disable-modules option

bin/magento setup:install -h
...
--disable-modules[=DISABLE-MODULES] List of comma-separated module names, that must be avoided during installation.
php bin/magento setup:install --disable-modules=Magento_InventoryElasticsearch,Magento_Elasticsearch7,Magento_Elasticsearch6,Magento_Elasticsearch

After installing enable all elastic search module with below command.

php bin/magento module:enable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_InventoryElasticsearch
How can I check current search engine?

You can check your current search engine using:

bin/magento config:show catalog/search/engine
How can I change search engine?

You can change your current search engine using:

bin/magento config:set catalog/search/engine 'lmysql'
setup:upgrade fails with "Current version of RDBMS is not supported"

This is a Magento core check, not an extension issue. Magento\Framework\Setup\Declaration\Schema\Db\MySQL\SqlVersionProvider only accepts the DB versions listed in app/etc/di.xml. In Magento 2.4.8 those are:

Engine Accepted versions
MySQL 5.7.x, 8.0.x, 8.4.x
MariaDB 10.2.x10.6.x, 11.4.x

Everything else is rejected — including MariaDB 10.7–10.11, 11.0–11.3 and 11.5+. This is a real gap: core still tolerates the legacy 10.2–10.6 range, but never 10.11 — so a hosting-side "minor" upgrade from 10.6 to 10.11 breaks setup:upgrade while the site itself keeps running. Adobe's supported database for 2.4.8 is MariaDB 11.4 LTS or MySQL 8.4 LTS.

The check runs only in Setup\Declaration\Schema\*, so it aborts setup:upgrade and other schema commands — it never touches storefront rendering. If pages break too, that is the half-applied upgrade the aborted command left behind, not the database version itself.

Move the database to a supported version (11.4 LTS), or roll it back to the version that worked.

Do not "fix" this by adding your version to the pattern list in di.xml. It unblocks the command, but SqlVersionProvider::getSqlVersion() then returns your version prefix (e.g. 10.11.) and two places in core have no entry for it:

  • Dto\Factories\Table keys its $defaultCharset / $defaultCollation maps on that string, with entries for 10.4., 10.6. and 11.4. only. An unknown key falls through to default, so every table and column that declarative schema creates from then on gets utf8 (utf8mb3) / utf8_general_ci instead of utf8mb4 — silently diverging from the rest of your schema.
  • DbSchemaWriter::isNeedToSplitSql() matches the same three strings, so it returns false and stops splitting multi-operation ALTER TABLE statements, which is behaviour MariaDB needs.

If the patch is already in place, check what it produced before removing it:

SELECT TABLE_NAME, TABLE_COLLATION FROM information_schema.TABLES
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_COLLATION NOT LIKE 'utf8mb4%';

This extension itself has no DB-version logic and imposes no database requirement of its own beyond Magento's — its search and layered-navigation SQL runs unchanged on 10.6, 10.11 and 11.4.

Configuration

Multi-word Search Logic

Location: Stores > Configuration > Catalog > Catalog Search > Multi-word Search Logic (MySQL Legacy)

Control how multi-word searches are interpreted:

OR Mode (Default) - Original Magento 2.3 behavior

  • Search: "red bag"
  • Finds: Products containing "red" OR "bag"
  • Result: More products, less precise matches

AND Mode (Recommended) - Elasticsearch-like behavior

  • Search: "red bag"
  • Finds: Products containing "red" AND "bag"
  • Result: Fewer products, more relevant matches

Note: Clear cache after changing this setting for immediate effect.

bin/magento cache:clean config

Future: Based on community feedback, AND mode may become the default in version 2.0.

← All packages from swissup