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.
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-legacyREADME
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.
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 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.
There are several ways to install extension for clients:
-
If you've bought the product at Magento's Marketplace - use Marketplace installation instructions
-
Otherwise, you have two options:
- Install the sources directly from our repository - recommended
- Download archive and use manual installation
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
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
You can check your current search engine using:
bin/magento config:show catalog/search/engine
You can change your current search engine using:
bin/magento config:set catalog/search/engine 'lmysql'
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.x–10.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\Tablekeys its$defaultCharset/$defaultCollationmaps on that string, with entries for10.4.,10.6.and11.4.only. An unknown key falls through todefault, so every table and column that declarative schema creates from then on getsutf8(utf8mb3) /utf8_general_ciinstead ofutf8mb4— silently diverging from the rest of your schema.DbSchemaWriter::isNeedToSplitSql()matches the same three strings, so it returnsfalseand stops splitting multi-operationALTER TABLEstatements, 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.
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.
Links
- Packagist
- PackageMaven — quality data by PackageMaven
- Repository
- Issues
